@tarojs/components 3.6.0-beta.1 → 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 +36 -0
- 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/esm/taro-swiper-core_2.entry.js +36 -0
- 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-c3c37cbb.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-22315b9d.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-22315b9d.entry.js.map +0 -1
- package/dist/taro-components/p-c3c37cbb.system.entry.js.map +0 -1
|
@@ -10126,14 +10126,50 @@ const Swiper = class {
|
|
|
10126
10126
|
};
|
|
10127
10127
|
Swiper.style = indexCss;
|
|
10128
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
|
+
}
|
|
10129
10152
|
const SwiperItem = class {
|
|
10130
10153
|
constructor(hostRef) {
|
|
10131
10154
|
index$1.registerInstance(this, hostRef);
|
|
10132
10155
|
this.itemId = undefined;
|
|
10133
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
|
+
}
|
|
10134
10169
|
render() {
|
|
10135
10170
|
return (index$1.h(index$1.Host, { class: 'swiper-slide', "item-id": this.itemId }));
|
|
10136
10171
|
}
|
|
10172
|
+
get el() { return index$1.getElement(this); }
|
|
10137
10173
|
};
|
|
10138
10174
|
|
|
10139
10175
|
exports.taro_swiper_core = Swiper;
|