提交 90d7de51 作者: 方治民

feat: 优化菜单 tag 配置、初始菜单路由主题

上级 eb110a42
......@@ -5,9 +5,10 @@
:dot="!getContent"
:count="getContent"
:number-style="{
color: 'f8f8f8',
lineHeight: '18px',
boxShadow: `0 0 0 1px #979797`,
boxShadow: `0 0 0 2px #fff`,
color: item.tag?.color ?? 'f8f8f8',
backgroundColor: item.tag?.background ?? '#ff4d4f',
}"
/>
</template>
......
......@@ -76,6 +76,7 @@ const tools: AppRouteModule = {
component: () => import('/@/views/demo/tools/online/form/index.vue'),
tag: {
content: '开发中',
background: '#f50',
},
},
{
......
......@@ -21,9 +21,10 @@ export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
}
export interface MenuTag {
type?: 'default' | 'warning' | 'error' | 'success' | 'processing'
content?: string
dot?: boolean
content?: string
color?: string
background?: string
}
export interface Menu {
......
......@@ -79,7 +79,7 @@ const setting: ProjectConfig = {
// Menu configuration
menuSetting: {
// sidebar menu bg color
bgColor: SIDE_BAR_BG_COLOR_LIST[3],
bgColor: SIDE_BAR_BG_COLOR_LIST[0],
// Whether to fix the left menu
fixed: true,
// Menu collapse
......@@ -100,7 +100,7 @@ const setting: ProjectConfig = {
// Menu mode
mode: MenuModeEnum.INLINE,
// Menu type
type: MenuTypeEnum.MIX,
type: MenuTypeEnum.SIDEBAR,
// Menu theme
theme: ThemeEnum.LIGHT,
// Split menu
......
......@@ -49,9 +49,14 @@ declare module 'vue-router' {
autoFullScreen?: boolean
// tag
tag?: {
type?: 'primary' | 'error' | 'warn' | 'success'
content?: string
// 是否以小圆点显示
dot?: boolean
// tag 文本
content?: string
// tag 颜色
color?: string
// tag 背景色
background?: string
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论