From 498d0f4b8785c99776936f33b1ea98ed75d3fe1c Mon Sep 17 00:00:00 2001 From: Timi Date: Sat, 29 Aug 2026 00:31:49 +0800 Subject: [PATCH] fix warning --- package.json | 5 ++ patches/tdesign-mobile-vue@1.16.0.patch | 84 +++++++++++++++++++++++++ pnpm-lock.yaml | 9 ++- src/components/PhotoScroller.vue | 6 +- 4 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 patches/tdesign-mobile-vue@1.16.0.patch diff --git a/package.json b/package.json index 5f30432..01eb2f5 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,11 @@ "type-check": "vue-tsc -p tsconfig.app.json --noEmit", "type-check:publish": "vue-tsc -p tsconfig.publish.json --noEmit" }, + "pnpm": { + "patchedDependencies": { + "tdesign-mobile-vue@1.16.0": "patches/tdesign-mobile-vue@1.16.0.patch" + } + }, "dependencies": { "@zxing/browser": "^0.1.5", "@zxing/library": "^0.21.3", diff --git a/patches/tdesign-mobile-vue@1.16.0.patch b/patches/tdesign-mobile-vue@1.16.0.patch new file mode 100644 index 0000000..d78b689 --- /dev/null +++ b/patches/tdesign-mobile-vue@1.16.0.patch @@ -0,0 +1,84 @@ +diff --git a/es/swiper/props.mjs b/es/swiper/props.mjs +--- a/es/swiper/props.mjs ++++ b/es/swiper/props.mjs +@@ -55,5 +55,5 @@ + }, + navigation: { +- type: [Object, Function] ++ type: [Boolean, Object, Function] + }, + nextMargin: { +diff --git a/esm/swiper/props.js b/esm/swiper/props.js +--- a/esm/swiper/props.js ++++ b/esm/swiper/props.js +@@ -55,5 +55,5 @@ + }, + navigation: { +- type: [Object, Function] ++ type: [Boolean, Object, Function] + }, + nextMargin: { +diff --git a/lib/swiper/props.js b/lib/swiper/props.js +--- a/lib/swiper/props.js ++++ b/lib/swiper/props.js +@@ -55,5 +55,5 @@ + }, + navigation: { +- type: [Object, Function] ++ type: [Boolean, Object, Function] + }, + nextMargin: { +diff --git a/cjs/swiper/props.js b/cjs/swiper/props.js +--- a/cjs/swiper/props.js ++++ b/cjs/swiper/props.js +@@ -59,5 +59,5 @@ + }, + navigation: { +- type: [Object, Function] ++ type: [Boolean, Object, Function] + }, + nextMargin: { +diff --git a/es/swiper/type.d.ts b/es/swiper/type.d.ts +--- a/es/swiper/type.d.ts ++++ b/es/swiper/type.d.ts +@@ -10,6 +10,6 @@ + height?: string | number; + interval?: number; + loop?: boolean; +- navigation?: SwiperNavigation | TNode; ++ navigation?: boolean | SwiperNavigation | TNode; + nextMargin?: string | number; + previousMargin?: string | number; +diff --git a/esm/swiper/type.d.ts b/esm/swiper/type.d.ts +--- a/esm/swiper/type.d.ts ++++ b/esm/swiper/type.d.ts +@@ -10,6 +10,6 @@ + height?: string | number; + interval?: number; + loop?: boolean; +- navigation?: SwiperNavigation | TNode; ++ navigation?: boolean | SwiperNavigation | TNode; + nextMargin?: string | number; + previousMargin?: string | number; +diff --git a/lib/swiper/type.d.ts b/lib/swiper/type.d.ts +--- a/lib/swiper/type.d.ts ++++ b/lib/swiper/type.d.ts +@@ -10,6 +10,6 @@ + height?: string | number; + interval?: number; + loop?: boolean; +- navigation?: SwiperNavigation | TNode; ++ navigation?: boolean | SwiperNavigation | TNode; + nextMargin?: string | number; + previousMargin?: string | number; +diff --git a/cjs/swiper/type.d.ts b/cjs/swiper/type.d.ts +--- a/cjs/swiper/type.d.ts ++++ b/cjs/swiper/type.d.ts +@@ -10,6 +10,6 @@ + height?: string | number; + interval?: number; + loop?: boolean; +- navigation?: SwiperNavigation | TNode; ++ navigation?: boolean | SwiperNavigation | TNode; + nextMargin?: string | number; + previousMargin?: string | number; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dca72ea..8548d22 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,11 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +patchedDependencies: + tdesign-mobile-vue@1.16.0: + hash: 2xgxuymu3bzalw6z7rwbgszafy + path: patches/tdesign-mobile-vue@1.16.0.patch + importers: .: @@ -28,7 +33,7 @@ importers: version: 3.0.4(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3)) tdesign-mobile-vue: specifier: ^1.16.0 - version: 1.16.0(vue@3.5.40(typescript@5.8.3)) + version: 1.16.0(patch_hash=2xgxuymu3bzalw6z7rwbgszafy)(vue@3.5.40(typescript@5.8.3)) timi-tdesign-mobile: specifier: 0.0.10 version: 0.0.10(typescript@5.8.3) @@ -3653,7 +3658,7 @@ snapshots: '@babel/runtime': 7.29.7 vue: 3.5.40(typescript@5.8.3) - tdesign-mobile-vue@1.16.0(vue@3.5.40(typescript@5.8.3)): + tdesign-mobile-vue@1.16.0(patch_hash=2xgxuymu3bzalw6z7rwbgszafy)(vue@3.5.40(typescript@5.8.3)): dependencies: '@babel/runtime': 7.29.7 '@use-gesture/vanilla': 10.3.1 diff --git a/src/components/PhotoScroller.vue b/src/components/PhotoScroller.vue index 1585e17..d4e9d9d 100644 --- a/src/components/PhotoScroller.vue +++ b/src/components/PhotoScroller.vue @@ -1,5 +1,5 @@