Skip to content

Commit

Permalink
perf: optimize css volume
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Aug 25, 2021
1 parent 0b0a7ce commit 466d4ed
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.
3 changes: 0 additions & 3 deletions src/components/Menu/src/BasicMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@
emit('menuClick', key);
isClickGo.value = true;
// const parentPath = await getCurrentParentPath(key);
// menuState.openKeys = [parentPath];
menuState.selectedKeys = [key];
}
Expand Down
18 changes: 2 additions & 16 deletions src/components/Menu/src/components/BasicMenuItem.vue
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
<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';
export default defineComponent({
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>
1 change: 0 additions & 1 deletion src/components/registerGlobComp.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { App } from 'vue';
// import { Icon } from './Icon';
import { Button } from './Button';
import {
// Need
Expand Down
2 changes: 1 addition & 1 deletion windi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 466d4ed

Please sign in to comment.