diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fc2098947a57f1512b3a7147e2279835c2cfb55..3bc629320c566ef96e8851abb5d74563d7b66bc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,10 @@ - 模态框默认显示关闭按钮、并且点击遮罩后关闭模态 - 移动端多数据部件、卡片只存在一页数据时不显示我已经到底啦提示 - 优化当前路由转换成路由路径对象,增加isRouteModal参数用于处理模态路由的情况 +- 数据关系分页路由跳转调整为replace模式,点击返回按钮可直接回到上一页面 +- 模态、模态路由打开视图默认宽高调整为60%,抽屉打开视图默认宽高调整为30%,并且默认隐藏关闭按钮 +- 移动端日历默认不加载数据,而是由组件根据选中的日期分别加载当天数据与当月数据 +- 选择多数据视图引擎调整视图激活模式为双击激活 ### Fixed @@ -38,6 +42,7 @@ - 修复markdown编辑器在ios中光标错位异常 - 修复多行文本框在ios中右对齐时换行时光标位置异常 - 修复多数据、卡片视图启用下拉刷新时无法滚动查看数据 +- 修复多数据、卡片视图启用视图下拉与分页栏时,分页栏定位异常 ## [0.7.41-alpha.21] - 2025-11-28 diff --git a/src/control/data-view/data-view.scss b/src/control/data-view/data-view.scss index 0f1f23fca36554e619cd1b53f3502ae5711870b9..6a49c34411fe76611038bfb63b8a5dee3c89e029 100644 --- a/src/control/data-view/data-view.scss +++ b/src/control/data-view/data-view.scss @@ -133,4 +133,20 @@ $control-dataview: ( display: flex; align-items: center; justify-content: center; +} + +// 兼容下拉视图刷新样式 +.#{bem(view-content-refresh)} { + .#{bem(control-dataview)}.is-enable-pagination { + position: relative; + .#{bem(control-dataview, content-container)} { + height: auto; + } + .#{bem(control-dataview, pagination)} { + position: sticky; + bottom: 0; + width: 100%; + background-color: getCssVar(color, bg, 1); + } + } } \ No newline at end of file diff --git a/src/control/drtab/drtab.controller.ts b/src/control/drtab/drtab.controller.ts index 1ab0e4965281ace27263ff39fce08a49e4e3cda5..e25d77c3ccc8567f13668b40aceb70f36df0a949 100644 --- a/src/control/drtab/drtab.controller.ts +++ b/src/control/drtab/drtab.controller.ts @@ -392,7 +392,7 @@ export class DRTabController } else { this.setVisible('form'); if (this.routeDepth && this.state.drTabPages[0]) { - this.router.push(this.state.drTabPages[0].fullPath!); + this.router.replace(this.state.drTabPages[0].fullPath!); } } } diff --git a/src/control/list/md-ctrl/md-ctrl.scss b/src/control/list/md-ctrl/md-ctrl.scss index bacc7ffe3cc289f47125c08fff7de60af454d104..c2cb98e4afd9bcf5aae879ad82932758c5afafbe 100644 --- a/src/control/list/md-ctrl/md-ctrl.scss +++ b/src/control/list/md-ctrl/md-ctrl.scss @@ -162,3 +162,19 @@ $control-mobmdctrl: ( align-items: center; justify-content: center; } + +// 兼容下拉视图刷新样式 +.#{bem(view-content-refresh)} { + .#{bem(control-mobmdctrl)}.is-enable-page { + position: relative; + .#{bem(control-mobmdctrl, content)} { + height: auto; + } + .#{bem(control-mobmdctrl, pagination)} { + position: sticky; + bottom: 0; + width: 100%; + background-color: getCssVar(color, bg, 1); + } + } +} diff --git a/src/mob-app/components/modal-router-shell/modal-router-shell.tsx b/src/mob-app/components/modal-router-shell/modal-router-shell.tsx index ecdd45abc940694d1fe26e2bce9fbb6a5da9431a..93fe6860670c820cf97df38516ee3dc6c33fcce5 100644 --- a/src/mob-app/components/modal-router-shell/modal-router-shell.tsx +++ b/src/mob-app/components/modal-router-shell/modal-router-shell.tsx @@ -121,8 +121,8 @@ export const ModalRouterShell = defineComponent({ } // 设置默认的modal参数 const opts = { - width: appView?.width || '80%', - height: appView?.height || '80%', + width: appView?.width || '60%', + height: appView?.height || '60%', footerHide: true, isRouteModal: true, }; diff --git a/src/panel-component/view-content-panel-container/view-content-panel-container.scss b/src/panel-component/view-content-panel-container/view-content-panel-container.scss index d13e3750d82b7cb431ab319a5e0a0977fdac2331..e87f5405f69e02854591c3d4c5624f764b1483e0 100644 --- a/src/panel-component/view-content-panel-container/view-content-panel-container.scss +++ b/src/panel-component/view-content-panel-container/view-content-panel-container.scss @@ -6,8 +6,12 @@ $control: ( 'overflow': hidden auto, ); -@include b(view) { +// 设置部件滚动条默认变量,此变量用于控制启用下拉刷新时控制内容部件滚动条 +:root { #{getCssVarName(control, overflow)}: hidden auto; +} + +@include b(view) { @include b(view-header) { z-index: 1; @@ -35,25 +39,11 @@ $control: ( 'color-background-color' ); - @include when(scroll) { + @include when(refresh) { overflow-y: auto; #{getCssVarName(control, overflow)}: unset unset; } - @include when(refresh) { - - >.#{bem(col)} { - flex: none; - } - } - - @include when(embed) { - #{getCssVarName(control, overflow)}: hidden auto; - } - - .#{bem(view)} { - #{getCssVarName(control, overflow)}: hidden auto; - } } @include b(view-content-refresh) { diff --git a/src/panel-component/view-content-panel-container/view-content-panel-container.tsx b/src/panel-component/view-content-panel-container/view-content-panel-container.tsx index 245713f610b2261f388ad9f05aab1223cafc4dd9..a99c80bbc2792120aae90aa22ac698b07a1351e9 100644 --- a/src/panel-component/view-content-panel-container/view-content-panel-container.tsx +++ b/src/panel-component/view-content-panel-container/view-content-panel-container.tsx @@ -147,13 +147,6 @@ export const ViewContentPanelContainer: Component = defineComponent({ return slot; } const { layoutPos } = props.modelData; - if (this.viewModel.enablePullDownRefresh === true) { - Object.assign(layoutPos, { - heightMode: 'AUTO', - grow: 0, - basis: 0, - }); - } return ( {slot} diff --git a/src/util/app-drawer/app-drawer-component.tsx b/src/util/app-drawer/app-drawer-component.tsx index c0d3372ae43d2e139e2b7091cae121a2f350c1dc..910aaf8e5649ac466b8d304ef0641a064cc359b9 100644 --- a/src/util/app-drawer/app-drawer-component.tsx +++ b/src/util/app-drawer/app-drawer-component.tsx @@ -55,24 +55,10 @@ export const AppDrawerComponent = defineComponent({ isShow.value = true; }; - let direction = ''; - - switch (props.opts.placement) { - case 'left': - direction = 'left'; - break; - case 'top': - direction = 'top'; - break; - case 'bottom': - direction = 'bottom'; - break; - default: - direction = 'right'; - } + const direction = props.opts.placement || 'right'; // 处理自定义样式 - const customStyle = reactive({ height: '80%' }); + const customStyle = reactive({ height: '100%' }); const { width, height } = props.opts; if (width) { if (isNumber(width)) { @@ -80,6 +66,8 @@ export const AppDrawerComponent = defineComponent({ } else { customStyle.width = width; } + } else if (['left', 'right'].includes(direction)) { + customStyle.width = '30%'; } if (height) { if (isNumber(height)) { @@ -87,6 +75,8 @@ export const AppDrawerComponent = defineComponent({ } else { customStyle.height = height; } + } else if (['top', 'bottom'].includes(direction)) { + customStyle.height = '30%'; } return { @@ -107,7 +97,6 @@ export const AppDrawerComponent = defineComponent({ v-model:show={this.isShow} lock-scroll={false} round - closeable close-on-popstate={true} close-icon-position='top-left' class={this.ns.b()} diff --git a/src/util/app-modal/app-modal-component.tsx b/src/util/app-modal/app-modal-component.tsx index bbcfacc73ee30b0e9436afb91a2f7ccbc56713be..3f7a2536f5a842ace3ead570cd8a180c4b6d39c3 100644 --- a/src/util/app-modal/app-modal-component.tsx +++ b/src/util/app-modal/app-modal-component.tsx @@ -40,16 +40,16 @@ export const AppModalComponent = defineComponent({ ? calcOpenModeStyle(width, 'modal') : width; } else { - // 默认全屏 - customStyle.width = '100vw'; + // 默认60% + customStyle.width = '60vw'; } if (height) { customStyle.height = isNumber(height) ? calcOpenModeStyle(height, 'modal') : height; } else { - // 默认全屏 - customStyle.height = '100vh'; + // 默认60% + customStyle.height = '60vh'; } // 合并options diff --git a/src/view-engine/mob-calendar-view.engine.ts b/src/view-engine/mob-calendar-view.engine.ts index 803d35ff5b2b6bccf45edc845cfb5b0b14802422..466ae24970cb016aa8c0725f8a2bcfbe176ff56b 100644 --- a/src/view-engine/mob-calendar-view.engine.ts +++ b/src/view-engine/mob-calendar-view.engine.ts @@ -12,4 +12,10 @@ export class MobCalendarViewEngine extends MDViewEngine { ICalendarViewState, ICalendarViewEvent >; + + async onCreated(): Promise { + await super.onCreated(); + // 移动端日历默认不加载数据,而是由组件根据选中的日期分别加载当天数据与当月数据 + this.view.model.loadDefault = false; + } } diff --git a/src/view-engine/mob-pickup-md-view.engine.ts b/src/view-engine/mob-pickup-md-view.engine.ts index 9df9d8478e7349ef2eae028bfa5db822b250d006..91f88345bac06823bc19d8366aafc6e4129e9bab 100644 --- a/src/view-engine/mob-pickup-md-view.engine.ts +++ b/src/view-engine/mob-pickup-md-view.engine.ts @@ -35,6 +35,7 @@ export class PickupMDViewEngine extends MDViewEngine { this.view.slotProps.mdctrl.singleSelect = this.view.state.singleSelect; this.view.slotProps.mdctrl.selectedData = this.view.state.selectedData; this.view.slotProps.mdctrl.mode = 'SELECT'; + this.view.slotProps.mdctrl.mdctrlActiveMode = 2; } async onMounted(): Promise {