@tarojs/components 3.6.0-beta.0 → 3.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +39 -5
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js.map +1 -1
- package/dist/collection/components/swiper/swiper-item.js +37 -1
- package/dist/collection/components/swiper/swiper-item.js.map +1 -1
- package/dist/collection/components/swiper/swiper.js +3 -5
- package/dist/collection/components/swiper/swiper.js.map +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +39 -5
- package/dist/esm/taro-swiper-core_2.entry.js.map +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js.map +1 -1
- package/dist/taro-components/{p-6831f7b1.system.entry.js → p-2a0c8d1d.system.entry.js} +2 -2
- package/dist/taro-components/p-2a0c8d1d.system.entry.js.map +1 -0
- package/dist/taro-components/{p-d388c097.entry.js → p-95a241f9.entry.js} +2 -2
- package/dist/taro-components/p-95a241f9.entry.js.map +1 -0
- package/dist/taro-components/p-cb17d8bd.system.js +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/swiper/swiper-item.d.ts +2 -0
- package/package.json +5 -5
- package/types/ChannelLive.d.ts +22 -0
- package/types/Form.d.ts +6 -0
- package/types/Input.d.ts +1 -0
- package/types/LivePusher.d.ts +15 -0
- package/types/ShareElement.d.ts +0 -5
- package/types/Textarea.d.ts +1 -0
- package/types/Video.d.ts +6 -0
- package/types/index.d.ts +1 -0
- package/dist/taro-components/p-6831f7b1.system.entry.js.map +0 -1
- package/dist/taro-components/p-d388c097.entry.js.map +0 -1
|
@@ -9886,11 +9886,9 @@ const Swiper = class {
|
|
|
9886
9886
|
this.handleSwiperLoop = index$2.debounce(() => {
|
|
9887
9887
|
if (this.swiper && this.circular) {
|
|
9888
9888
|
// @ts-ignore
|
|
9889
|
-
this.swiper.
|
|
9890
|
-
// @ts-ignore
|
|
9891
|
-
this.swiper.loopCreate();
|
|
9889
|
+
this.swiper.loopFix();
|
|
9892
9890
|
}
|
|
9893
|
-
},
|
|
9891
|
+
}, 50);
|
|
9894
9892
|
this.handleSwiperSize = index$2.debounce(() => {
|
|
9895
9893
|
if (this.swiper && !this.circular) {
|
|
9896
9894
|
this.swiper.updateSlides();
|
|
@@ -10047,7 +10045,7 @@ const Swiper = class {
|
|
|
10047
10045
|
slideChangeTransitionStart(_swiper) {
|
|
10048
10046
|
if (that.circular) {
|
|
10049
10047
|
if (_swiper.isBeginning || _swiper.isEnd) {
|
|
10050
|
-
_swiper.slideToLoop(this.realIndex, 0)
|
|
10048
|
+
// _swiper.slideToLoop(this.realIndex, 0, false) // 更新下标
|
|
10051
10049
|
return;
|
|
10052
10050
|
}
|
|
10053
10051
|
}
|
|
@@ -10128,14 +10126,50 @@ const Swiper = class {
|
|
|
10128
10126
|
};
|
|
10129
10127
|
Swiper.style = indexCss;
|
|
10130
10128
|
|
|
10129
|
+
function isEqualTag(a, b) {
|
|
10130
|
+
return typeof a.tagName === 'undefined' ? a.nodeType === b.nodeType : a.tagName === b.tagName;
|
|
10131
|
+
}
|
|
10132
|
+
function parseChildNodes(items, targets) {
|
|
10133
|
+
const list = Array.from(targets.values());
|
|
10134
|
+
for (let i = 0, j = 0; i < list.length; i++, j++) {
|
|
10135
|
+
const target = list[i];
|
|
10136
|
+
let item = items.item(j);
|
|
10137
|
+
while (item && !isEqualTag(item, target)) {
|
|
10138
|
+
item.remove();
|
|
10139
|
+
j++;
|
|
10140
|
+
item = items.item(j);
|
|
10141
|
+
}
|
|
10142
|
+
if (item && !item.isEqualNode(target)) {
|
|
10143
|
+
parseChildNodes(item.childNodes, target.childNodes);
|
|
10144
|
+
}
|
|
10145
|
+
while (i === list.length - 1 && j < items.length) {
|
|
10146
|
+
j++;
|
|
10147
|
+
item = items.item(j);
|
|
10148
|
+
item === null || item === void 0 ? void 0 : item.remove();
|
|
10149
|
+
}
|
|
10150
|
+
}
|
|
10151
|
+
}
|
|
10131
10152
|
const SwiperItem = class {
|
|
10132
10153
|
constructor(hostRef) {
|
|
10133
10154
|
index$1.registerInstance(this, hostRef);
|
|
10134
10155
|
this.itemId = undefined;
|
|
10135
10156
|
}
|
|
10157
|
+
componentDidRender() {
|
|
10158
|
+
var _a, _b, _c;
|
|
10159
|
+
const el = this.el;
|
|
10160
|
+
if (el.classList.contains('swiper-slide-duplicate')) {
|
|
10161
|
+
const list = Array
|
|
10162
|
+
.from(((_b = (_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.childNodes) === null || _b === void 0 ? void 0 : _b.values()) || [])
|
|
10163
|
+
.filter((e) => e.tagName === 'TARO-SWIPER-ITEM-CORE');
|
|
10164
|
+
if (list.length > 0) {
|
|
10165
|
+
parseChildNodes(el.childNodes, (_c = list[list.indexOf(el) === 0 ? list.length - 2 : 1]) === null || _c === void 0 ? void 0 : _c.childNodes);
|
|
10166
|
+
}
|
|
10167
|
+
}
|
|
10168
|
+
}
|
|
10136
10169
|
render() {
|
|
10137
10170
|
return (index$1.h(index$1.Host, { class: 'swiper-slide', "item-id": this.itemId }));
|
|
10138
10171
|
}
|
|
10172
|
+
get el() { return index$1.getElement(this); }
|
|
10139
10173
|
};
|
|
10140
10174
|
|
|
10141
10175
|
exports.taro_swiper_core = Swiper;
|