mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-02-02 18:08:40 +08:00
perf: optimize css volume
This commit is contained in:
parent
0b0a7ceef9
commit
466d4edcd0
@ -126,9 +126,6 @@
|
|||||||
emit('menuClick', key);
|
emit('menuClick', key);
|
||||||
|
|
||||||
isClickGo.value = true;
|
isClickGo.value = true;
|
||||||
// const parentPath = await getCurrentParentPath(key);
|
|
||||||
|
|
||||||
// menuState.openKeys = [parentPath];
|
|
||||||
menuState.selectedKeys = [key];
|
menuState.selectedKeys = [key];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<MenuItem :key="item.path">
|
<MenuItem :key="item.path">
|
||||||
<!-- <MenuItem :class="getLevelClass"> -->
|
|
||||||
<MenuItemContent v-bind="$props" :item="item" />
|
<MenuItemContent v-bind="$props" :item="item" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { Menu } from 'ant-design-vue';
|
import { Menu } from 'ant-design-vue';
|
||||||
import { useDesign } from '/@/hooks/web/useDesign';
|
|
||||||
import { itemProps } from '../props';
|
import { itemProps } from '../props';
|
||||||
|
|
||||||
import MenuItemContent from './MenuItemContent.vue';
|
import MenuItemContent from './MenuItemContent.vue';
|
||||||
@ -15,20 +13,8 @@
|
|||||||
name: 'BasicMenuItem',
|
name: 'BasicMenuItem',
|
||||||
components: { MenuItem: Menu.Item, MenuItemContent },
|
components: { MenuItem: Menu.Item, MenuItemContent },
|
||||||
props: itemProps,
|
props: itemProps,
|
||||||
setup() // props
|
setup() {
|
||||||
{
|
return {};
|
||||||
const { prefixCls } = useDesign('basic-menu-item');
|
|
||||||
|
|
||||||
// const getLevelClass = computed(() => {
|
|
||||||
// const { level, theme } = props;
|
|
||||||
|
|
||||||
// const levelCls = [`${prefixCls}__level${level}`, theme];
|
|
||||||
// return levelCls;
|
|
||||||
// });
|
|
||||||
return {
|
|
||||||
prefixCls,
|
|
||||||
// getLevelClass,
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import type { App } from 'vue';
|
import type { App } from 'vue';
|
||||||
// import { Icon } from './Icon';
|
|
||||||
import { Button } from './Button';
|
import { Button } from './Button';
|
||||||
import {
|
import {
|
||||||
// Need
|
// Need
|
||||||
|
@ -29,7 +29,7 @@ export default defineConfig({
|
|||||||
* Used for animation when the element is displayed
|
* Used for animation when the element is displayed
|
||||||
* @param maxOutput The larger the maxOutput output, the larger the generated css volume
|
* @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 createCss = (index: number, d = 'x') => {
|
||||||
const upd = d.toUpperCase();
|
const upd = d.toUpperCase();
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user