huangbin 4 年 前
コミット
24eda0c0b2
1 ファイル変更12 行追加2 行削除
  1. 12 2
      src/layout/components/menu.vue

+ 12 - 2
src/layout/components/menu.vue

@@ -1,7 +1,7 @@
 <template>
   <a-menu theme="dark"
           mode="inline"
-          class="left-menu"
+          :class="['left-menu', isBottom ? 'left-menu_bottom' : 'left-menu_no_bottom']"
           v-model:selectedKeys="selectedKeys"
           v-model:openKeys="openKeys"
           @click="menuClick">
@@ -30,6 +30,7 @@ import { defineComponent, ref, SetupContext, unref, watchEffect } from 'vue';
 import APP from '@/services';
 import { initData } from '@/common/methods';
 import { OperationTabMenu } from '@/services/go/commonService/interface';
+import { getHasBottom } from '@/common/setup/order/orderData';
 
 function handleMenu(context: SetupContext) {
     const selectedKeys = ref<string[]>(['1-1']);
@@ -82,6 +83,7 @@ export default defineComponent({
         },
     },
     setup(props, context) {
+        const isBottom = getHasBottom();
         const { selectedKeys, openKeys, menuList, menuClick, preOpenKeys, fontIcon } = handleMenu(context);
         watchEffect(() => {
             if (props.collapsed) {
@@ -116,7 +118,15 @@ export default defineComponent({
                 context.emit('chooseMenu', temp);
             }
         });
-        return { selectedKeys, openKeys, filterMenu, menuClick, fontIcon };
+        return { selectedKeys, openKeys, filterMenu, menuClick, fontIcon, isBottom };
     },
 });
 </script>
+<style lang="less">
+.left-menu_no_bottom {
+    height: calc(100vh - 86px) !important;
+}
+.left-menu_bottom {
+    height: calc(100vh - 376px) !important;
+}
+</style>