提交 90d7de51 作者: 方治民

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

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