diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d4cc21dce4207599ed8494021f065f64fc77fec..5a6f20ed967b04838b627ff0b510b3fd87e47819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ ## Fixed +- 修复数据关系分页部件流布局模式下嵌套数据关系分页部件流布局时样式异常以及初始导航栏定位异常问题 +- 修复面板分页组件在切换分页时,如果分页里面有气泡飘窗,切换时飘窗会定位到界面左上角的样式异常问题 - 修复首页空白占位存在二级路由时依然绘制空白占位 ## [0.7.41-alpha.18] - 2025-08-14 diff --git a/src/control/drtab/flow-drtab.scss b/src/control/drtab/flow-drtab.scss index beb05b778960792df6e87563b5a666dfc4400dbc..aac2a81b42e60976a66ebc33cba730d5c878db5f 100644 --- a/src/control/drtab/flow-drtab.scss +++ b/src/control/drtab/flow-drtab.scss @@ -124,8 +124,8 @@ flex-direction: row; overflow: auto; - @include e('container') { - --navbarwidth: 200; + >.#{bem(flow-drtab,container)}{ + --navbarwidth: 200px; flex: 1 0; width: calc(100% - var(--navbarwidth) - (2 * getCssVar(spacing, base))); @@ -148,8 +148,8 @@ flex-direction: row-reverse; overflow: auto; - @include e('container') { - --navbarwidth: 200; + >.#{bem(flow-drtab,container)}{ + --navbarwidth: 200px; flex: 1 0; width: calc(100% - var(--navbarwidth) - (2 * getCssVar(spacing, base))); diff --git a/src/control/drtab/flow-drtab.tsx b/src/control/drtab/flow-drtab.tsx index 7aa21f5b495097c69bdc3dbf90b5b7554a17bda7..d897767cb3b28d146237cd9bb9fa1db2271d3771 100644 --- a/src/control/drtab/flow-drtab.tsx +++ b/src/control/drtab/flow-drtab.tsx @@ -163,9 +163,6 @@ export const FlowDrtab = defineComponent({ // 创建 Intersection Observer 对象,用来观察滚动元素 const observer = new IntersectionObserver( (entries: IntersectionObserverEntry[]) => { - if (allVisibleViews.value !== completedViews.value) { - return; - } entries.forEach(entry => { if (entry.isIntersecting) { // 当元素进入视口时执行的操作 @@ -194,6 +191,14 @@ export const FlowDrtab = defineComponent({ } } }); + visibleViews.sort((a: string, b: string) => { + const aIndex = allNavTags.value?.findIndex(tag => tag === a); + const bIndex = allNavTags.value?.findIndex(tag => tag === b); + return aIndex - bIndex; + }); + if (allVisibleViews.value !== completedViews.value || !c.enableAnchor) { + return; + } computeSelectItem(); }, ); @@ -211,7 +216,11 @@ export const FlowDrtab = defineComponent({ if (el) { observer.observe(el); } - if (completedViews.value === allVisibleViews.value && props.activeTab) { + if ( + completedViews.value === allVisibleViews.value && + props.activeTab && + props.activeTab.tag !== props.drtabpages[0].id + ) { nextTick(() => { scrollToTarget(); }); @@ -226,7 +235,10 @@ export const FlowDrtab = defineComponent({ return page.id === newVal.tag; }); navtag.value = `${target?.appViewId}_${newVal.tag}`; - scrollToTarget(); + if (newVal.tag !== props.drtabpages[0].id) { + // 不是第一个才滚动 + scrollToTarget(); + } } }, { diff --git a/src/panel-component/panel-tab-panel/panel-tab-panel.tsx b/src/panel-component/panel-tab-panel/panel-tab-panel.tsx index 27c817fc45772b86aaeb00d76e8b033936be94b3..07986cf6f72d412cf9a0b168cba9ad1fad1f84c9 100644 --- a/src/panel-component/panel-tab-panel/panel-tab-panel.tsx +++ b/src/panel-component/panel-tab-panel/panel-tab-panel.tsx @@ -83,7 +83,7 @@ export const PanelTabPanel = defineComponent({ name={c.model.id} lazy > - {slot} + {this.state.activeTab === c.model.id && slot} ); })}