bge-ui 1.8.7 → 1.8.8
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/index.js +3 -1
- package/package.json +1 -1
- package/src/tabs/index.vue +2 -1
package/dist/index.js
CHANGED
|
@@ -6773,6 +6773,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
6773
6773
|
};
|
|
6774
6774
|
const navScrollRef = ref();
|
|
6775
6775
|
const getNavOffset = () => {
|
|
6776
|
+
if (!navScrollRef.value)
|
|
6777
|
+
return;
|
|
6776
6778
|
panes.value.forEach((tab, index2) => {
|
|
6777
6779
|
const $el = tab.ref;
|
|
6778
6780
|
if (!$el)
|
|
@@ -6801,7 +6803,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
6801
6803
|
};
|
|
6802
6804
|
});
|
|
6803
6805
|
const update = () => {
|
|
6804
|
-
if (panes.value.length > 0) {
|
|
6806
|
+
if (panes.value.length > 0 && navScrollRef.value) {
|
|
6805
6807
|
const right2 = panes.value[panes.value.length - 1].ref.getBoundingClientRect().right;
|
|
6806
6808
|
const left2 = panes.value[0].ref.getBoundingClientRect().left;
|
|
6807
6809
|
const navScrollBounding = navScrollRef.value.getBoundingClientRect();
|
package/package.json
CHANGED
package/src/tabs/index.vue
CHANGED
|
@@ -145,6 +145,7 @@ const getBarStyle: any = () => {
|
|
|
145
145
|
|
|
146
146
|
const navScrollRef = ref()
|
|
147
147
|
const getNavOffset: any = () => {
|
|
148
|
+
if (!navScrollRef.value) return
|
|
148
149
|
panes.value.forEach((tab: any, index: number) => {
|
|
149
150
|
const $el = tab.ref as HTMLElement
|
|
150
151
|
if (!$el) return false
|
|
@@ -174,7 +175,7 @@ const panesStyle = computed(() => {
|
|
|
174
175
|
}
|
|
175
176
|
})
|
|
176
177
|
const update = () => {
|
|
177
|
-
if (panes.value.length > 0) {
|
|
178
|
+
if (panes.value.length > 0 && navScrollRef.value) {
|
|
178
179
|
const right = panes.value[panes.value.length - 1].ref.getBoundingClientRect().right
|
|
179
180
|
const left = panes.value[0].ref.getBoundingClientRect().left
|
|
180
181
|
const navScrollBounding = navScrollRef.value.getBoundingClientRect()
|