Commit 466d4edcd02fc91e2b4cdbbc3c501bfd2fde7a3d

Authored by vben
1 parent 0b0a7cee

perf: optimize css volume

src/components/Menu/src/BasicMenu.vue
... ... @@ -126,9 +126,6 @@
126 126 emit('menuClick', key);
127 127  
128 128 isClickGo.value = true;
129   - // const parentPath = await getCurrentParentPath(key);
130   -
131   - // menuState.openKeys = [parentPath];
132 129 menuState.selectedKeys = [key];
133 130 }
134 131  
... ...
src/components/Menu/src/components/BasicMenuItem.vue
1 1 <template>
2 2 <MenuItem :key="item.path">
3   - <!-- <MenuItem :class="getLevelClass"> -->
4 3 <MenuItemContent v-bind="$props" :item="item" />
5 4 </MenuItem>
6 5 </template>
7 6 <script lang="ts">
8 7 import { defineComponent } from 'vue';
9 8 import { Menu } from 'ant-design-vue';
10   - import { useDesign } from '/@/hooks/web/useDesign';
11 9 import { itemProps } from '../props';
12 10  
13 11 import MenuItemContent from './MenuItemContent.vue';
... ... @@ -15,20 +13,8 @@
15 13 name: 'BasicMenuItem',
16 14 components: { MenuItem: Menu.Item, MenuItemContent },
17 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 20 </script>
... ...
src/components/registerGlobComp.ts
1 1 import type { App } from 'vue';
2   -// import { Icon } from './Icon';
3 2 import { Button } from './Button';
4 3 import {
5 4 // Need
... ...
windi.config.ts
... ... @@ -29,7 +29,7 @@ export default defineConfig({
29 29 * Used for animation when the element is displayed
30 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 33 const createCss = (index: number, d = 'x') => {
34 34 const upd = d.toUpperCase();
35 35 return {
... ...