mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
chore: 优化
This commit is contained in:
@@ -218,5 +218,9 @@ export default {
|
||||
return m.DescriptionsItem;
|
||||
})
|
||||
);
|
||||
app.component(
|
||||
"AResult",
|
||||
defineAsyncComponent(() => import("ant-design-vue/es/result"))
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ import LayoutBasic from "/@/layout/layout-basic.vue";
|
||||
import type { RouteRecordRaw } from "vue-router";
|
||||
|
||||
import { mergeRouteModules } from "/@/vben/utils";
|
||||
const dynamicRouteFiles = import.meta.glob("./modules/**/*.ts", {
|
||||
const dynamicRouteFiles = import.meta.glob("./modules/**/*.ts*", {
|
||||
eager: true
|
||||
});
|
||||
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
import { IFrameView } from "/@/vben/layouts";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
import { computed } from "vue";
|
||||
|
||||
export const aboutResource = [
|
||||
{
|
||||
@@ -1,23 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import type { MenuRecordRaw } from '/@/vben/typings';
|
||||
import type { MenuRecordRaw } from "/@/vben/typings";
|
||||
|
||||
import type { MenuProps } from './types';
|
||||
import type { MenuProps } from "./types";
|
||||
|
||||
import { useForwardProps } from '/@/vben/composables';
|
||||
import { useForwardProps } from "/@/vben/composables";
|
||||
|
||||
import { Menu } from './components';
|
||||
import SubMenu from './sub-menu.vue';
|
||||
import { Menu } from "./components";
|
||||
import SubMenu from "./sub-menu.vue";
|
||||
|
||||
interface Props extends MenuProps {
|
||||
menus: MenuRecordRaw[];
|
||||
}
|
||||
|
||||
defineOptions({
|
||||
name: 'MenuView',
|
||||
name: "MenuView"
|
||||
});
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
collapse: false,
|
||||
collapse: false
|
||||
// theme: 'dark',
|
||||
});
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import type { MenuRecordRaw } from '/@/vben/typings';
|
||||
import type { MenuRecordRaw } from "/@/vben/typings";
|
||||
|
||||
import { computed } from 'vue';
|
||||
import { computed } from "vue";
|
||||
|
||||
import { MenuBadge, MenuItem, SubMenu as SubMenuComp } from './components';
|
||||
import { MenuBadge, MenuItem, SubMenu as SubMenuComp } from "./components";
|
||||
// eslint-disable-next-line import/no-self-import
|
||||
import SubMenu from './sub-menu.vue';
|
||||
import SubMenu from "./sub-menu.vue";
|
||||
import { FsSlotRender } from "@fast-crud/fast-crud";
|
||||
|
||||
interface Props {
|
||||
/**
|
||||
@@ -15,7 +16,7 @@ interface Props {
|
||||
}
|
||||
|
||||
defineOptions({
|
||||
name: 'SubMenuUi',
|
||||
name: "SubMenuUi"
|
||||
});
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {});
|
||||
@@ -25,9 +26,7 @@ const props = withDefaults(defineProps<Props>(), {});
|
||||
*/
|
||||
const hasChildren = computed(() => {
|
||||
const { menu } = props;
|
||||
return (
|
||||
Reflect.has(menu, 'children') && !!menu.children && menu.children.length > 0
|
||||
);
|
||||
return Reflect.has(menu, "children") && !!menu.children && menu.children.length > 0;
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -41,25 +40,18 @@ const hasChildren = computed(() => {
|
||||
:badge-variants="menu.badgeVariants"
|
||||
:icon="menu.icon"
|
||||
:path="menu.path"
|
||||
@click="menu.meta?.onClick"
|
||||
>
|
||||
<template #title>
|
||||
<span>{{ menu.name }}</span>
|
||||
</template>
|
||||
<template v-if="menu.meta?.slot" #default>
|
||||
<fs-render :render-func="menu.meta.slot" />
|
||||
</template>
|
||||
</MenuItem>
|
||||
<SubMenuComp
|
||||
v-else
|
||||
:key="`${menu.path}_sub`"
|
||||
:active-icon="menu.activeIcon"
|
||||
:icon="menu.icon"
|
||||
:path="menu.path"
|
||||
>
|
||||
<SubMenuComp v-else :key="`${menu.path}_sub`" :active-icon="menu.activeIcon" :icon="menu.icon" :path="menu.path">
|
||||
<template #content>
|
||||
<MenuBadge
|
||||
:badge="menu.badge"
|
||||
:badge-type="menu.badgeType"
|
||||
:badge-variants="menu.badgeVariants"
|
||||
class="right-6"
|
||||
/>
|
||||
<MenuBadge :badge="menu.badge" :badge-type="menu.badgeType" :badge-variants="menu.badgeVariants" class="right-6" />
|
||||
</template>
|
||||
<template #title>
|
||||
<span>{{ menu.name }}</span>
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
v{{ version }}
|
||||
</a-tag>
|
||||
</a-badge>
|
||||
<a-divider type="vertical" />
|
||||
<vip-button mode="nav" style="font-size: 12px"></vip-button>
|
||||
</template>
|
||||
<template v-if="settingsStore.isComm">
|
||||
<a-divider type="vertical" />
|
||||
|
||||
Reference in New Issue
Block a user