Commit 466d4edcd02fc91e2b4cdbbc3c501bfd2fde7a3d
1 parent
0b0a7cee
perf: optimize css volume
Showing
4 changed files
with
3 additions
and
21 deletions
src/components/Menu/src/BasicMenu.vue
@@ -126,9 +126,6 @@ | @@ -126,9 +126,6 @@ | ||
126 | emit('menuClick', key); | 126 | emit('menuClick', key); |
127 | 127 | ||
128 | isClickGo.value = true; | 128 | isClickGo.value = true; |
129 | - // const parentPath = await getCurrentParentPath(key); | ||
130 | - | ||
131 | - // menuState.openKeys = [parentPath]; | ||
132 | menuState.selectedKeys = [key]; | 129 | menuState.selectedKeys = [key]; |
133 | } | 130 | } |
134 | 131 |
src/components/Menu/src/components/BasicMenuItem.vue
1 | <template> | 1 | <template> |
2 | <MenuItem :key="item.path"> | 2 | <MenuItem :key="item.path"> |
3 | - <!-- <MenuItem :class="getLevelClass"> --> | ||
4 | <MenuItemContent v-bind="$props" :item="item" /> | 3 | <MenuItemContent v-bind="$props" :item="item" /> |
5 | </MenuItem> | 4 | </MenuItem> |
6 | </template> | 5 | </template> |
7 | <script lang="ts"> | 6 | <script lang="ts"> |
8 | import { defineComponent } from 'vue'; | 7 | import { defineComponent } from 'vue'; |
9 | import { Menu } from 'ant-design-vue'; | 8 | import { Menu } from 'ant-design-vue'; |
10 | - import { useDesign } from '/@/hooks/web/useDesign'; | ||
11 | import { itemProps } from '../props'; | 9 | import { itemProps } from '../props'; |
12 | 10 | ||
13 | import MenuItemContent from './MenuItemContent.vue'; | 11 | import MenuItemContent from './MenuItemContent.vue'; |
@@ -15,20 +13,8 @@ | @@ -15,20 +13,8 @@ | ||
15 | name: 'BasicMenuItem', | 13 | name: 'BasicMenuItem', |
16 | components: { MenuItem: Menu.Item, MenuItemContent }, | 14 | components: { MenuItem: Menu.Item, MenuItemContent }, |
17 | props: itemProps, | 15 | props: itemProps, |
18 | - setup() // props | ||
19 | - { | ||
20 | - const { prefixCls } = useDesign('basic-menu-item'); | ||
21 | - | ||
22 | - // const getLevelClass = computed(() => { | ||
23 | - // const { level, theme } = props; | ||
24 | - | ||
25 | - // const levelCls = [`${prefixCls}__level${level}`, theme]; | ||
26 | - // return levelCls; | ||
27 | - // }); | ||
28 | - return { | ||
29 | - prefixCls, | ||
30 | - // getLevelClass, | ||
31 | - }; | 16 | + setup() { |
17 | + return {}; | ||
32 | }, | 18 | }, |
33 | }); | 19 | }); |
34 | </script> | 20 | </script> |
src/components/registerGlobComp.ts
windi.config.ts
@@ -29,7 +29,7 @@ export default defineConfig({ | @@ -29,7 +29,7 @@ export default defineConfig({ | ||
29 | * Used for animation when the element is displayed | 29 | * Used for animation when the element is displayed |
30 | * @param maxOutput The larger the maxOutput output, the larger the generated css volume | 30 | * @param maxOutput The larger the maxOutput output, the larger the generated css volume |
31 | */ | 31 | */ |
32 | -function createEnterPlugin(maxOutput = 10) { | 32 | +function createEnterPlugin(maxOutput = 8) { |
33 | const createCss = (index: number, d = 'x') => { | 33 | const createCss = (index: number, d = 'x') => { |
34 | const upd = d.toUpperCase(); | 34 | const upd = d.toUpperCase(); |
35 | return { | 35 | return { |