From b6df5e1e1c0c11a9346b4afb54a911eee05f8c28 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Wed, 29 Jan 2025 23:18:18 +0800 Subject: [PATCH] style: lint fix --- plugins/plugin-md-power/src/client/composables/pdf.ts | 10 +++++----- theme/src/client/components/VPBackToTop.vue | 4 ++-- theme/src/client/components/VPBulletin.vue | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/plugins/plugin-md-power/src/client/composables/pdf.ts b/plugins/plugin-md-power/src/client/composables/pdf.ts index 533eb294..dc79bf90 100644 --- a/plugins/plugin-md-power/src/client/composables/pdf.ts +++ b/plugins/plugin-md-power/src/client/composables/pdf.ts @@ -93,8 +93,8 @@ export function usePDF( const isFirefoxWithPDFJS = !isMobileDevice - && /firefox/iu.test(userAgent) - && userAgent.split('rv:').length > 1 + && /firefox/iu.test(userAgent) + && userAgent.split('rv:').length > 1 ? Number.parseInt(userAgent.split('rv:')[1].split('.')[0], 10) > 18 : false @@ -103,9 +103,9 @@ export function usePDF( // As of Sept 2020 no mobile browsers properly support PDF embeds = !isMobileDevice // We're moving into the age of MIME-less browsers. They mostly all support PDF rendering without plugins. - && (isModernBrowser - // Modern versions of Firefox come bundled with PDFJS - || isFirefoxWithPDFJS) + && (isModernBrowser + // Modern versions of Firefox come bundled with PDFJS + || isFirefoxWithPDFJS) if (!url) return diff --git a/theme/src/client/components/VPBackToTop.vue b/theme/src/client/components/VPBackToTop.vue index cbd5c007..ec319513 100644 --- a/theme/src/client/components/VPBackToTop.vue +++ b/theme/src/client/components/VPBackToTop.vue @@ -131,7 +131,7 @@ function handleClick() { .vp-back-to-top svg circle { fill: none; - r: 16; + r: 16px; stroke: var(--vp-c-brand-2); stroke-dasharray: 0% 314.1593%; stroke-width: 4px; @@ -157,7 +157,7 @@ function handleClick() { } .vp-back-to-top svg circle { - r: 22; + r: 22px; } } diff --git a/theme/src/client/components/VPBulletin.vue b/theme/src/client/components/VPBulletin.vue index f472eccd..d37974e5 100644 --- a/theme/src/client/components/VPBulletin.vue +++ b/theme/src/client/components/VPBulletin.vue @@ -93,7 +93,8 @@ const { bulletin, showBulletin, enableBulletin, close } = useBulletinControl() mask: linear-gradient(var(--vp-c-bg) 0 100%) content-box, linear-gradient(var(--vp-c-bg) 0 100%); - mask-composite: xor; + -webkit-mask-composite: xor; + mask-composite: subtract; } .vp-bulletin:where(.preset) .close {