wave-ui 3.4.0 → 3.4.1

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.
@@ -5708,17 +5708,19 @@ const ks = {
5708
5708
  this.slider.left = `${this.activeTab._index * 100 / this.tabs.length}%`, this.slider.width = `${100 / this.tabs.length}%`;
5709
5709
  },
5710
5710
  updateActiveTab(e) {
5711
- typeof e == "string" ? e = ~~e : (isNaN(e) || e < 0) && (e = 0), this.openTab(this.tabs[e]._uid), this.$nextTick(() => {
5712
- const t = this.$refs["tabs-bar"];
5713
- this.activeTabEl = t && t.querySelector(`.w-tabs__bar-item:nth-child(${e + 1})`), this.activeTabEl && this.activeTabEl.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
5714
- });
5711
+ var t, l;
5712
+ 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(() => {
5713
+ const a = this.$refs["tabs-bar"];
5714
+ this.activeTabEl = a && a.querySelector(`.w-tabs__bar-item:nth-child(${e + 1})`), this.activeTabEl && this.activeTabEl.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
5715
+ }));
5715
5716
  },
5716
5717
  getOriginalItem(e) {
5717
5718
  return this.items[e._index] || {};
5718
5719
  }
5719
5720
  },
5720
5721
  beforeMount() {
5721
- this.tabs = [], (typeof this.items == "number" ? Array(this.items).fill().map(Object) : this.items).forEach(this.addTab), this.updateActiveTab(this.modelValue), this.$nextTick(() => {
5722
+ var t;
5723
+ 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
5724
  this.updateSlider(), setTimeout(() => this.init = !1, 0);
5723
5725
  }), this.noSlider || window.addEventListener("resize", this.onResize);
5724
5726
  },