wave-ui 3.4.0 → 3.4.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/wave-ui.es.js
CHANGED
|
@@ -5435,10 +5435,7 @@ function hs(e, t, l, a, r, i) {
|
|
|
5435
5435
|
}
|
|
5436
5436
|
const cs = {
|
|
5437
5437
|
name: "tab-content",
|
|
5438
|
-
props: { item: Object }
|
|
5439
|
-
mounted() {
|
|
5440
|
-
console.log("mounted!", this.item._uid);
|
|
5441
|
-
}
|
|
5438
|
+
props: { item: Object }
|
|
5442
5439
|
}, ps = /* @__PURE__ */ v(cs, [["render", hs]]), fs = ["onClick", "onFocus", "tabindex", "onKeypress", "aria-selected"], gs = ["innerHTML"], ms = {
|
|
5443
5440
|
key: 0,
|
|
5444
5441
|
class: "w-tabs__bar-extra"
|
|
@@ -5708,17 +5705,19 @@ const ks = {
|
|
|
5708
5705
|
this.slider.left = `${this.activeTab._index * 100 / this.tabs.length}%`, this.slider.width = `${100 / this.tabs.length}%`;
|
|
5709
5706
|
},
|
|
5710
5707
|
updateActiveTab(e) {
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5708
|
+
var t, l;
|
|
5709
|
+
typeof e == "string" ? e = ~~e : (isNaN(e) || e < 0) && (e = 0), (t = this.tabs[e]) != null && t._uid && (this.openTab((l = this.tabs[e]) == null ? void 0 : l._uid), this.$nextTick(() => {
|
|
5710
|
+
const a = this.$refs["tabs-bar"];
|
|
5711
|
+
this.activeTabEl = a && a.querySelector(`.w-tabs__bar-item:nth-child(${e + 1})`), this.activeTabEl && this.activeTabEl.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
5712
|
+
}));
|
|
5715
5713
|
},
|
|
5716
5714
|
getOriginalItem(e) {
|
|
5717
5715
|
return this.items[e._index] || {};
|
|
5718
5716
|
}
|
|
5719
5717
|
},
|
|
5720
5718
|
beforeMount() {
|
|
5721
|
-
|
|
5719
|
+
var t;
|
|
5720
|
+
this.tabs = [], (typeof this.items == "number" ? Array(this.items).fill().map(Object) : this.items).forEach(this.addTab), (t = this.modelValue) != null && t && this.updateActiveTab(this.modelValue), this.$nextTick(() => {
|
|
5722
5721
|
this.updateSlider(), setTimeout(() => this.init = !1, 0);
|
|
5723
5722
|
}), this.noSlider || window.addEventListener("resize", this.onResize);
|
|
5724
5723
|
},
|