From ebbd788fbb2c0b45d4473798efc57eec8ba74a25 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 18 六月 2024 14:51:16 +0800 Subject: [PATCH] 版本更新至2.11.5 --- src/layouts/default/content/index.vue | 52 ++++++++++++++++++++++++++++------------------------ 1 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/layouts/default/content/index.vue b/src/layouts/default/content/index.vue index 00cad20..68c794f 100644 --- a/src/layouts/default/content/index.vue +++ b/src/layouts/default/content/index.vue @@ -1,41 +1,45 @@ <template> - <div :class="[prefixCls, getLayoutContentMode]" v-loading="getOpenPageLoading && getPageLoading"> + <div + :class="[prefixCls, getLayoutContentMode]" + v-loading="getOpenPageLoading && getPageLoading" + ref="content" + > <PageLayout /> + <BackTop v-if="getUseOpenBackTop" :target="() => content" :visibilityHeight="100" /> </div> </template> -<script lang="ts"> - import { defineComponent } from 'vue'; - import PageLayout from '/@/layouts/page/index.vue'; - import { useDesign } from '/@/hooks/web/useDesign'; - import { useRootSetting } from '/@/hooks/setting/useRootSetting'; - import { useTransitionSetting } from '/@/hooks/setting/useTransitionSetting'; +<script lang="ts" setup> + import { ref } from 'vue'; + import { BackTop } from 'ant-design-vue'; + + import PageLayout from '@/layouts/page/index.vue'; + import { useDesign } from '@/hooks/web/useDesign'; + import { useRootSetting } from '@/hooks/setting/useRootSetting'; + import { useTransitionSetting } from '@/hooks/setting/useTransitionSetting'; import { useContentViewHeight } from './useContentViewHeight'; - export default defineComponent({ - name: 'LayoutContent', - components: { PageLayout }, - setup() { - const { prefixCls } = useDesign('layout-content'); - const { getOpenPageLoading } = useTransitionSetting(); - const { getLayoutContentMode, getPageLoading } = useRootSetting(); + defineOptions({ name: 'LayoutContent' }); - useContentViewHeight(); - return { - prefixCls, - getOpenPageLoading, - getLayoutContentMode, - getPageLoading, - }; - }, - }); + const { prefixCls } = useDesign('layout-content'); + const { getOpenPageLoading } = useTransitionSetting(); + const { getLayoutContentMode, getPageLoading, getUseOpenBackTop } = useRootSetting(); + + useContentViewHeight(); + + const content = ref(); </script> <style lang="less"> @prefix-cls: ~'@{namespace}-layout-content'; .@{prefix-cls} { + display: flex; position: relative; - flex: 1 1 auto; + flex-direction: column; + flex-grow: 1; + width: 100%; + height: 0; min-height: 0; + overflow: auto; // begin: 涓嬮潰杩欏潡浠g爜 鍦ㄦ垜鐨勯」鐩墦鍖呭悗鍦ㄦ瘮杈冨鐨勫睆骞�(2K 31 瀵�)鏈夋樉绀� bug 鏈夊伓鍙戞�� 娓呯紦瀛橀娆¤繘鍏ヤ細鍑虹幇 , 鍒锋柊灏辨病浜�, 杩欓噷涓轰粈涔堣鎸囧畾瀹藉害 ? &.fixed { -- Gitblit v1.9.3