소스 검색

perf: optimize css volume

vben 3 년 전
부모
커밋
466d4edcd0
4개의 변경된 파일3개의 추가작업 그리고 21개의 파일을 삭제
  1. 0 3
      src/components/Menu/src/BasicMenu.vue
  2. 2 16
      src/components/Menu/src/components/BasicMenuItem.vue
  3. 0 1
      src/components/registerGlobComp.ts
  4. 1 1
      windi.config.ts

+ 0 - 3
src/components/Menu/src/BasicMenu.vue

@@ -126,9 +126,6 @@
         emit('menuClick', key);
 
         isClickGo.value = true;
-        // const parentPath = await getCurrentParentPath(key);
-
-        // menuState.openKeys = [parentPath];
         menuState.selectedKeys = [key];
       }
 

+ 2 - 16
src/components/Menu/src/components/BasicMenuItem.vue

@@ -1,13 +1,11 @@
 <template>
   <MenuItem :key="item.path">
-    <!-- <MenuItem :class="getLevelClass"> -->
     <MenuItemContent v-bind="$props" :item="item" />
   </MenuItem>
 </template>
 <script lang="ts">
   import { defineComponent } from 'vue';
   import { Menu } from 'ant-design-vue';
-  import { useDesign } from '/@/hooks/web/useDesign';
   import { itemProps } from '../props';
 
   import MenuItemContent from './MenuItemContent.vue';
@@ -15,20 +13,8 @@
     name: 'BasicMenuItem',
     components: { MenuItem: Menu.Item, MenuItemContent },
     props: itemProps,
-    setup() // props
-    {
-      const { prefixCls } = useDesign('basic-menu-item');
-
-      // const getLevelClass = computed(() => {
-      //   const { level, theme } = props;
-
-      //   const levelCls = [`${prefixCls}__level${level}`, theme];
-      //   return levelCls;
-      // });
-      return {
-        prefixCls,
-        // getLevelClass,
-      };
+    setup() {
+      return {};
     },
   });
 </script>

+ 0 - 1
src/components/registerGlobComp.ts

@@ -1,5 +1,4 @@
 import type { App } from 'vue';
-// import { Icon } from './Icon';
 import { Button } from './Button';
 import {
   // Need

+ 1 - 1
windi.config.ts

@@ -29,7 +29,7 @@ export default defineConfig({
  * Used for animation when the element is displayed
  * @param maxOutput The larger the maxOutput output, the larger the generated css volume
  */
-function createEnterPlugin(maxOutput = 10) {
+function createEnterPlugin(maxOutput = 8) {
   const createCss = (index: number, d = 'x') => {
     const upd = d.toUpperCase();
     return {