upper attachment-selector to lib

This commit is contained in:
Timi
2026-10-21 16:24:00 +08:00
parent e40c912dd9
commit c870bcdd39
43 changed files with 678 additions and 1663 deletions
+92 -68
View File
@@ -1,80 +1,21 @@
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
index 5615922a8c3410f703f768e363d39afa3138e7b1..b9a192a32dba34970287d0521e7e2077ac5b034c 100644
--- a/cjs/swiper/props.js
+++ b/cjs/swiper/props.js
@@ -59,5 +59,5 @@
@@ -57,7 +57,7 @@ var props = {
default: true
},
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;
type: [String, Number],
diff --git a/cjs/swiper/type.d.ts b/cjs/swiper/type.d.ts
index f72d82f2902ebd0636c091450a0d77ae00964917..75b7920cb3e94fac6fc7c1ef909c6972128d06f3 100644
--- a/cjs/swiper/type.d.ts
+++ b/cjs/swiper/type.d.ts
@@ -10,6 +10,6 @@
@@ -10,7 +10,7 @@ export interface TdSwiperProps {
height?: string | number;
interval?: number;
loop?: boolean;
@@ -82,10 +23,14 @@ diff --git a/cjs/swiper/type.d.ts b/cjs/swiper/type.d.ts
+ navigation?: boolean | SwiperNavigation | TNode;
nextMargin?: string | number;
previousMargin?: string | number;
onChange?: (current: number, context: {
diff --git a/es/shared/hover.mjs b/es/shared/hover.mjs
index 634ba6d66891d1c98d62c48d2069a0519a6633ed..20c84d3176f194afe1fa530d8db3a87b0faf2979 100644
--- a/es/shared/hover.mjs
+++ b/es/shared/hover.mjs
@@ -50,29 +50,33 @@
@@ -48,13 +48,15 @@ var Hover = {
current: state,
timers: [],
add: function add() {
- if (ctx.current.disabledHover || !ctx.current.className) return;
- if (!el.classList.contains(ctx.current.className)) {
@@ -103,8 +48,7 @@ diff --git a/es/shared/hover.mjs b/es/shared/hover.mjs
},
clearTimers: function clearTimers() {
ctx.timers.forEach(function (t) {
return window.clearTimeout(t);
});
@@ -63,18 +65,20 @@ var Hover = {
ctx.timers = [];
},
downHandler: function downHandler() {
@@ -127,3 +71,83 @@ diff --git a/es/shared/hover.mjs b/es/shared/hover.mjs
- }, ctx.current.stayTime));
+ }, current.stayTime));
},
cancelHandler: function cancelHandler() {
ctx.clearTimers();
diff --git a/es/swiper/props.mjs b/es/swiper/props.mjs
index a48cee3e0abe71c2ef1f3e83303ec061cb098f8d..27511b26df36116f59a27b584120ea71451d7bf0 100644
--- a/es/swiper/props.mjs
+++ b/es/swiper/props.mjs
@@ -53,7 +53,7 @@ var props = {
default: true
},
navigation: {
- type: [Object, Function]
+ type: [Boolean, Object, Function]
},
nextMargin: {
type: [String, Number],
diff --git a/es/swiper/type.d.ts b/es/swiper/type.d.ts
index f72d82f2902ebd0636c091450a0d77ae00964917..75b7920cb3e94fac6fc7c1ef909c6972128d06f3 100644
--- a/es/swiper/type.d.ts
+++ b/es/swiper/type.d.ts
@@ -10,7 +10,7 @@ export interface TdSwiperProps {
height?: string | number;
interval?: number;
loop?: boolean;
- navigation?: SwiperNavigation | TNode;
+ navigation?: boolean | SwiperNavigation | TNode;
nextMargin?: string | number;
previousMargin?: string | number;
onChange?: (current: number, context: {
diff --git a/esm/swiper/props.js b/esm/swiper/props.js
index 1b4ac31d550b0cb1aac6cc0f4bca7590d6df16cb..c959b7eaa05bd34704bf724f77fe5be230dbb0ad 100644
--- a/esm/swiper/props.js
+++ b/esm/swiper/props.js
@@ -53,7 +53,7 @@ var props = {
default: true
},
navigation: {
- type: [Object, Function]
+ type: [Boolean, Object, Function]
},
nextMargin: {
type: [String, Number],
diff --git a/esm/swiper/type.d.ts b/esm/swiper/type.d.ts
index f72d82f2902ebd0636c091450a0d77ae00964917..75b7920cb3e94fac6fc7c1ef909c6972128d06f3 100644
--- a/esm/swiper/type.d.ts
+++ b/esm/swiper/type.d.ts
@@ -10,7 +10,7 @@ export interface TdSwiperProps {
height?: string | number;
interval?: number;
loop?: boolean;
- navigation?: SwiperNavigation | TNode;
+ navigation?: boolean | SwiperNavigation | TNode;
nextMargin?: string | number;
previousMargin?: string | number;
onChange?: (current: number, context: {
diff --git a/lib/swiper/props.js b/lib/swiper/props.js
index 1b4ac31d550b0cb1aac6cc0f4bca7590d6df16cb..c959b7eaa05bd34704bf724f77fe5be230dbb0ad 100644
--- a/lib/swiper/props.js
+++ b/lib/swiper/props.js
@@ -53,7 +53,7 @@ var props = {
default: true
},
navigation: {
- type: [Object, Function]
+ type: [Boolean, Object, Function]
},
nextMargin: {
type: [String, Number],
diff --git a/lib/swiper/type.d.ts b/lib/swiper/type.d.ts
index f72d82f2902ebd0636c091450a0d77ae00964917..75b7920cb3e94fac6fc7c1ef909c6972128d06f3 100644
--- a/lib/swiper/type.d.ts
+++ b/lib/swiper/type.d.ts
@@ -10,7 +10,7 @@ export interface TdSwiperProps {
height?: string | number;
interval?: number;
loop?: boolean;
- navigation?: SwiperNavigation | TNode;
+ navigation?: boolean | SwiperNavigation | TNode;
nextMargin?: string | number;
previousMargin?: string | number;
onChange?: (current: number, context: {