From d5d4c4b4136158e061e4a3b6b306af6d4e8cd621 Mon Sep 17 00:00:00 2001 From: Vben Date: Sun, 7 Mar 2021 20:59:11 +0800 Subject: [PATCH] fix(menu): fix menu icon missing close #328 --- src/components/Menu/index.ts | 4 +- .../Menu/src/components/ExpandIcon.vue | 43 -------------- .../Menu/src/components/MenuItemTag.vue | 57 ------------------- src/components/SimpleMenu/index.ts | 1 + .../SimpleMenu/src/SimpleMenuTag.vue | 9 ++- src/layouts/default/sider/MixSider.vue | 34 ++--------- src/layouts/default/sider/index.vue | 1 + src/main.ts | 11 ++-- src/store/modules/permission.ts | 7 +-- stylelint.config.js | 1 + 10 files changed, 22 insertions(+), 146 deletions(-) delete mode 100644 src/components/Menu/src/components/ExpandIcon.vue delete mode 100644 src/components/Menu/src/components/MenuItemTag.vue diff --git a/src/components/Menu/index.ts b/src/components/Menu/index.ts index 088c3793..5f457bc3 100644 --- a/src/components/Menu/index.ts +++ b/src/components/Menu/index.ts @@ -1,9 +1,9 @@ -import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; +// import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; import BasicMenu from './src/BasicMenu.vue'; // export const BasicMenu = createAsyncComponent(() => import('./src/BasicMenu.vue')); -export const MenuTag = createAsyncComponent(() => import('./src/components/MenuItemTag.vue')); +// export const MenuTag = createAsyncComponent(() => import('./src/components/MenuItemTag.vue')); export { BasicMenu }; diff --git a/src/components/Menu/src/components/ExpandIcon.vue b/src/components/Menu/src/components/ExpandIcon.vue deleted file mode 100644 index eafd5ed6..00000000 --- a/src/components/Menu/src/components/ExpandIcon.vue +++ /dev/null @@ -1,43 +0,0 @@ - - diff --git a/src/components/Menu/src/components/MenuItemTag.vue b/src/components/Menu/src/components/MenuItemTag.vue deleted file mode 100644 index 81567d8b..00000000 --- a/src/components/Menu/src/components/MenuItemTag.vue +++ /dev/null @@ -1,57 +0,0 @@ - - diff --git a/src/components/SimpleMenu/index.ts b/src/components/SimpleMenu/index.ts index 8e496068..0dfd2485 100644 --- a/src/components/SimpleMenu/index.ts +++ b/src/components/SimpleMenu/index.ts @@ -1 +1,2 @@ export { default as SimpleMenu } from './src/SimpleMenu.vue'; +export { default as SimpleMenuTag } from './src/SimpleMenuTag.vue'; diff --git a/src/components/SimpleMenu/src/SimpleMenuTag.vue b/src/components/SimpleMenu/src/SimpleMenuTag.vue index 45c4ad1f..94992e6b 100644 --- a/src/components/SimpleMenu/src/SimpleMenuTag.vue +++ b/src/components/SimpleMenu/src/SimpleMenuTag.vue @@ -8,6 +8,7 @@ import { defineComponent, computed } from 'vue'; import { useDesign } from '/@/hooks/web/useDesign'; + import { propTypes } from '/@/utils/propTypes'; export default defineComponent({ name: 'SimpleMenuTag', @@ -16,10 +17,8 @@ type: Object as PropType, default: {}, }, - collapseParent: { - type: Boolean as PropType, - default: false, - }, + dot: propTypes.bool, + collapseParent: propTypes.bool, }, setup(props) { const { prefixCls } = useDesign('simple-menu'); @@ -56,7 +55,7 @@ [`${tagCls}--${type}`], { [`${tagCls}--collapse`]: collapseParent, - [`${tagCls}--dot`]: dot, + [`${tagCls}--dot`]: dot || props.dot, }, ]; }); diff --git a/src/layouts/default/sider/MixSider.vue b/src/layouts/default/sider/MixSider.vue index 20c059ab..352abeaf 100644 --- a/src/layouts/default/sider/MixSider.vue +++ b/src/layouts/default/sider/MixSider.vue @@ -1,6 +1,5 @@