mirror of
https://github.com/chatopera/cosin.git
synced 2025-08-01 16:38:02 +08:00
fix: breadcrumb warning
Signed-off-by: Kaifuny <superbiger.github@gmail.com>
This commit is contained in:
parent
c5d3179d0e
commit
ede05a0e9c
@ -12,10 +12,12 @@ export enum ROUTE_NAME {
|
|||||||
// 模块路由
|
// 模块路由
|
||||||
// ==================================================================================
|
// ==================================================================================
|
||||||
// 认证模块
|
// 认证模块
|
||||||
|
AUTH_INDEX = 'AUTH_INDEX',
|
||||||
AUTH_LOGIN = 'AUTH_LOGIN',
|
AUTH_LOGIN = 'AUTH_LOGIN',
|
||||||
|
|
||||||
// 看板模块
|
// 看板模块
|
||||||
DASHBOARD_INDEX = 'DASHBOARD_INDEX',
|
DASHBOARD_INDEX = 'DASHBOARD_INDEX',
|
||||||
|
DASHBOARD_HOME_INDEX = 'DASHBOARD_HOME_INDEX',
|
||||||
|
|
||||||
// 对话模块
|
// 对话模块
|
||||||
CHAT_INDEX = 'CHAT_INDEX',
|
CHAT_INDEX = 'CHAT_INDEX',
|
||||||
@ -36,12 +38,15 @@ export enum ROUTE_NAME {
|
|||||||
|
|
||||||
// 组织管理模块
|
// 组织管理模块
|
||||||
ORGANIZATION_INDEX = 'ORGANIZATION_INDEX',
|
ORGANIZATION_INDEX = 'ORGANIZATION_INDEX',
|
||||||
|
ORGANIZATION_HOME_INDEX = 'ORGANIZATION_HOME_INDEX', // 组织管理首页
|
||||||
|
|
||||||
// 设置模块
|
// 设置模块
|
||||||
SETTING_INDEX = 'SETTING_INDEX',
|
SETTING_INDEX = 'SETTING_INDEX',
|
||||||
|
SETTING_HOME_INDEX = 'SETTING_HOME_INDEX', // 设置首页
|
||||||
|
|
||||||
// 企业设置模块
|
// 企业设置模块
|
||||||
ENTERPRISE_INDEX = 'ENTERPRISE_INDEX',
|
ENTERPRISE_INDEX = 'ENTERPRISE_INDEX',
|
||||||
|
ENTERPRISE_SERVICES_INDEX = 'ENTERPRISE_DASHBOARD_INDEX', // 企业服务
|
||||||
ENTERPRISE_CHANNEL_INDEX = 'ENTERPRISE_CHANNEL_INDEX', // 渠道接入
|
ENTERPRISE_CHANNEL_INDEX = 'ENTERPRISE_CHANNEL_INDEX', // 渠道接入
|
||||||
ENTERPRISE_KNOWLEDGE_INDEX = 'ENTERPRISE_KNOWLEDGE_INDEX', // 知识库
|
ENTERPRISE_KNOWLEDGE_INDEX = 'ENTERPRISE_KNOWLEDGE_INDEX', // 知识库
|
||||||
ENTERPRISE_QUALITY_INDEX = 'ENTERPRISE_QUALITY_INDEX', // 质检
|
ENTERPRISE_QUALITY_INDEX = 'ENTERPRISE_QUALITY_INDEX', // 质检
|
||||||
|
@ -6,6 +6,7 @@ import { ROUTE_NAME } from '@cskefu/models'
|
|||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/auth',
|
path: '/auth',
|
||||||
|
name: ROUTE_NAME.AUTH_INDEX,
|
||||||
component: IndexLayout,
|
component: IndexLayout,
|
||||||
redirect: { name: ROUTE_NAME.AUTH_LOGIN },
|
redirect: { name: ROUTE_NAME.AUTH_LOGIN },
|
||||||
children: [
|
children: [
|
||||||
|
@ -6,13 +6,12 @@ import Layout from '../layouts/MenusLayout.vue'
|
|||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/chat',
|
path: '/chat',
|
||||||
name: 'chat',
|
name: ROUTE_NAME.CHAT_INDEX,
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/chat/index',
|
redirect: '/chat/index',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
name: ROUTE_NAME.CHAT_INDEX,
|
|
||||||
component: () => import('../views/HomeView.vue'),
|
component: () => import('../views/HomeView.vue'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -6,13 +6,13 @@ import { ROUTE_NAME } from '@cskefu/models'
|
|||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/dashboard',
|
path: '/dashboard',
|
||||||
name: 'dashboard',
|
name: ROUTE_NAME.DASHBOARD_INDEX,
|
||||||
component: IndexLayout,
|
component: IndexLayout,
|
||||||
redirect: { name: ROUTE_NAME.DASHBOARD_INDEX },
|
redirect: { name: ROUTE_NAME.DASHBOARD_HOME_INDEX },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
name: ROUTE_NAME.DASHBOARD_INDEX,
|
name: ROUTE_NAME.DASHBOARD_HOME_INDEX,
|
||||||
component: () => import('../views/DashboardView.vue'),
|
component: () => import('../views/DashboardView.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '数据看板',
|
title: '数据看板',
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, h } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { MenuOption, NBreadcrumbItem } from 'naive-ui'
|
import { MenuOption } from 'naive-ui'
|
||||||
|
|
||||||
import { MenusLayout } from '@cskefu/shared-ui'
|
import { MenusLayout } from '@cskefu/shared-ui'
|
||||||
import { routesToMenus } from '@cskefu/shared-utils'
|
import { routesToMenus } from '@cskefu/shared-utils'
|
||||||
import { Menu } from '@cskefu/shared-ui'
|
import { Menu } from '@cskefu/shared-ui'
|
||||||
import { ROUTE_NAME } from '@cskefu/models'
|
|
||||||
|
|
||||||
import routes from '../routes'
|
import routes from '../routes'
|
||||||
|
|
||||||
@ -17,14 +16,6 @@ const collapsed = ref<boolean>(false)
|
|||||||
v-model:collapsed="collapsed"
|
v-model:collapsed="collapsed"
|
||||||
:page-title="$route.meta.title"
|
:page-title="$route.meta.title"
|
||||||
:page-icon="$route.meta.icon"
|
:page-icon="$route.meta.icon"
|
||||||
:page-breadcrumbs="[
|
|
||||||
h(NBreadcrumbItem, { to: { name: ROUTE_NAME.DASHBOARD_INDEX } }, '首页'),
|
|
||||||
h(
|
|
||||||
NBreadcrumbItem,
|
|
||||||
{ to: { name: $route.name } },
|
|
||||||
$route.meta.title as string
|
|
||||||
),
|
|
||||||
]"
|
|
||||||
>
|
>
|
||||||
<Menu
|
<Menu
|
||||||
v-model:collapsed="collapsed"
|
v-model:collapsed="collapsed"
|
||||||
|
@ -14,13 +14,13 @@ import {
|
|||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/enterprise',
|
path: '/enterprise',
|
||||||
name: 'enterprise',
|
name: ROUTE_NAME.ENTERPRISE_INDEX,
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/enterprise/index',
|
redirect: '/enterprise/index',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
name: ROUTE_NAME.ENTERPRISE_INDEX,
|
name: ROUTE_NAME.ENTERPRISE_SERVICES_INDEX,
|
||||||
component: () => import('../views/HomeView.vue'),
|
component: () => import('../views/HomeView.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '企业服务',
|
title: '企业服务',
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { MenusLayout } from '@cskefu/shared-ui'
|
import { MenusLayout } from '@cskefu/shared-ui'
|
||||||
import { MenuOption, NBreadcrumbItem } from 'naive-ui'
|
import { MenuOption } from 'naive-ui'
|
||||||
|
|
||||||
import { Menu } from '@cskefu/shared-ui'
|
import { Menu } from '@cskefu/shared-ui'
|
||||||
import { ROUTE_NAME } from '@cskefu/models'
|
import { ref } from 'vue'
|
||||||
import { ref, h } from 'vue'
|
|
||||||
|
|
||||||
const menuOptions: MenuOption[] = []
|
const menuOptions: MenuOption[] = []
|
||||||
const collapsed = ref<boolean>(false)
|
const collapsed = ref<boolean>(false)
|
||||||
@ -14,14 +13,6 @@ const collapsed = ref<boolean>(false)
|
|||||||
v-model:collapsed="collapsed"
|
v-model:collapsed="collapsed"
|
||||||
:page-title="$route.meta.title"
|
:page-title="$route.meta.title"
|
||||||
:page-icon="$route.meta.icon"
|
:page-icon="$route.meta.icon"
|
||||||
:page-breadcrumbs="[
|
|
||||||
h(NBreadcrumbItem, { to: { name: ROUTE_NAME.DASHBOARD_INDEX } }, '首页'),
|
|
||||||
h(
|
|
||||||
NBreadcrumbItem,
|
|
||||||
{ to: { name: $route.name } },
|
|
||||||
$route.meta.title as string
|
|
||||||
),
|
|
||||||
]"
|
|
||||||
>
|
>
|
||||||
<Menu
|
<Menu
|
||||||
v-model:collapsed="collapsed"
|
v-model:collapsed="collapsed"
|
||||||
|
@ -6,13 +6,13 @@ import Layout from '../layouts/MenusLayout.vue'
|
|||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/organization',
|
path: '/organization',
|
||||||
name: 'organization',
|
name: ROUTE_NAME.ORGANIZATION_INDEX,
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/organization/index',
|
redirect: { name: ROUTE_NAME.ORGANIZATION_HOME_INDEX },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
name: ROUTE_NAME.ORGANIZATION_INDEX,
|
name: ROUTE_NAME.ORGANIZATION_HOME_INDEX,
|
||||||
component: () => import('../views/HomeView.vue'),
|
component: () => import('../views/HomeView.vue'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, h } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { MenuOption, NBreadcrumbItem } from 'naive-ui'
|
import { MenuOption } from 'naive-ui'
|
||||||
|
|
||||||
import { MenusLayout } from '@cskefu/shared-ui'
|
import { MenusLayout } from '@cskefu/shared-ui'
|
||||||
import { routesToMenus } from '@cskefu/shared-utils'
|
import { routesToMenus } from '@cskefu/shared-utils'
|
||||||
import { Menu } from '@cskefu/shared-ui'
|
import { Menu } from '@cskefu/shared-ui'
|
||||||
import { ROUTE_NAME } from '@cskefu/models'
|
|
||||||
|
|
||||||
import routes from '../routes'
|
import routes from '../routes'
|
||||||
|
|
||||||
@ -17,14 +16,6 @@ const collapsed = ref<boolean>(false)
|
|||||||
v-model:collapsed="collapsed"
|
v-model:collapsed="collapsed"
|
||||||
:page-title="$route.meta.title"
|
:page-title="$route.meta.title"
|
||||||
:page-icon="$route.meta.icon"
|
:page-icon="$route.meta.icon"
|
||||||
:page-breadcrumbs="[
|
|
||||||
h(NBreadcrumbItem, { to: { name: ROUTE_NAME.DASHBOARD_INDEX } }, '首页'),
|
|
||||||
h(
|
|
||||||
NBreadcrumbItem,
|
|
||||||
{ to: { name: $route.name } },
|
|
||||||
$route.meta.title as string
|
|
||||||
),
|
|
||||||
]"
|
|
||||||
>
|
>
|
||||||
<Menu
|
<Menu
|
||||||
v-model:collapsed="collapsed"
|
v-model:collapsed="collapsed"
|
||||||
|
@ -13,7 +13,7 @@ import {
|
|||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/seats',
|
path: '/seats',
|
||||||
name: 'seats',
|
name: ROUTE_NAME.SEATS_INDEX,
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/seats/index',
|
redirect: '/seats/index',
|
||||||
children: [
|
children: [
|
||||||
@ -66,7 +66,7 @@ const routes: RouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'dashboard',
|
||||||
name: ROUTE_NAME.SEATS_ROBOT_DASHBOARD_INDEX,
|
name: ROUTE_NAME.SEATS_ROBOT_DASHBOARD_INDEX,
|
||||||
component: () => import('../views/HomeView.vue'),
|
component: () => import('../views/HomeView.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
@ -85,7 +85,7 @@ const routes: RouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'setting',
|
path: 'setting',
|
||||||
name: ROUTE_NAME.SEATS_INDEX,
|
name: ROUTE_NAME.SEATS_ROBOT_SETTING_INDEX,
|
||||||
component: () => import('../views/HomeView.vue'),
|
component: () => import('../views/HomeView.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '机器人设置',
|
title: '机器人设置',
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { MenusLayout } from '@cskefu/shared-ui'
|
import { MenusLayout } from '@cskefu/shared-ui'
|
||||||
import { MenuOption, NBreadcrumbItem } from 'naive-ui'
|
import { MenuOption } from 'naive-ui'
|
||||||
import { Menu } from '@cskefu/shared-ui'
|
import { Menu } from '@cskefu/shared-ui'
|
||||||
import { ref, h } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { ROUTE_NAME } from '@cskefu/models'
|
|
||||||
|
|
||||||
const menuOptions: MenuOption[] = []
|
const menuOptions: MenuOption[] = []
|
||||||
const collapsed = ref<boolean>(false)
|
const collapsed = ref<boolean>(false)
|
||||||
@ -13,14 +12,6 @@ const collapsed = ref<boolean>(false)
|
|||||||
v-model:collapsed="collapsed"
|
v-model:collapsed="collapsed"
|
||||||
:page-title="$route.meta.title"
|
:page-title="$route.meta.title"
|
||||||
:page-icon="$route.meta.icon"
|
:page-icon="$route.meta.icon"
|
||||||
:page-breadcrumbs="[
|
|
||||||
h(NBreadcrumbItem, { to: { name: ROUTE_NAME.DASHBOARD_INDEX } }, '首页'),
|
|
||||||
h(
|
|
||||||
NBreadcrumbItem,
|
|
||||||
{ to: { name: $route.name } },
|
|
||||||
$route.meta.title as string
|
|
||||||
),
|
|
||||||
]"
|
|
||||||
>
|
>
|
||||||
<Menu
|
<Menu
|
||||||
v-model:collapsed="collapsed"
|
v-model:collapsed="collapsed"
|
||||||
|
@ -6,13 +6,13 @@ import Layout from '../layouts/MenusLayout.vue'
|
|||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/setting',
|
path: '/setting',
|
||||||
name: 'setting',
|
name: ROUTE_NAME.SETTING_INDEX,
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: { name: ROUTE_NAME.SETTING_INDEX },
|
redirect: { name: ROUTE_NAME.SETTING_HOME_INDEX },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
name: ROUTE_NAME.SETTING_INDEX,
|
name: ROUTE_NAME.SETTING_HOME_INDEX,
|
||||||
component: () => import('../views/HomeView.vue'),
|
component: () => import('../views/HomeView.vue'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, h } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { MenuOption, NBreadcrumbItem } from 'naive-ui'
|
import { MenuOption } from 'naive-ui'
|
||||||
|
|
||||||
import { Menu } from '@cskefu/shared-ui'
|
import { Menu } from '@cskefu/shared-ui'
|
||||||
import { MenusLayout } from '@cskefu/shared-ui'
|
import { MenusLayout } from '@cskefu/shared-ui'
|
||||||
import { routesToMenus } from '@cskefu/shared-utils'
|
import { routesToMenus } from '@cskefu/shared-utils'
|
||||||
|
|
||||||
import routes from '../routes'
|
import routes from '../routes'
|
||||||
import { ROUTE_NAME } from '@cskefu/models'
|
|
||||||
|
|
||||||
const menuOptions: MenuOption[] = routesToMenus(routes)
|
const menuOptions: MenuOption[] = routesToMenus(routes)
|
||||||
const collapsed = ref<boolean>(false)
|
const collapsed = ref<boolean>(false)
|
||||||
@ -17,14 +16,6 @@ const collapsed = ref<boolean>(false)
|
|||||||
v-model:collapsed="collapsed"
|
v-model:collapsed="collapsed"
|
||||||
:page-title="$route.meta.title"
|
:page-title="$route.meta.title"
|
||||||
:page-icon="$route.meta.icon"
|
:page-icon="$route.meta.icon"
|
||||||
:page-breadcrumbs="[
|
|
||||||
h(NBreadcrumbItem, { to: { name: ROUTE_NAME.DASHBOARD_INDEX } }, '首页'),
|
|
||||||
h(
|
|
||||||
NBreadcrumbItem,
|
|
||||||
{ to: { name: $route.name } },
|
|
||||||
$route.meta.title as string
|
|
||||||
),
|
|
||||||
]"
|
|
||||||
>
|
>
|
||||||
<Menu
|
<Menu
|
||||||
v-model:collapsed="collapsed"
|
v-model:collapsed="collapsed"
|
||||||
|
@ -18,13 +18,13 @@ import {
|
|||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/system',
|
path: '/system',
|
||||||
name: 'system',
|
name: ROUTE_NAME.SYSTEM_INDEX,
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/system/index',
|
redirect: '/system/index',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
name: ROUTE_NAME.SYSTEM_INDEX,
|
name: ROUTE_NAME.SYSTEM_INFO_INDEX,
|
||||||
component: () => import('../views/HomeView.vue'),
|
component: () => import('../views/HomeView.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '系统信息',
|
title: '系统信息',
|
||||||
|
@ -4,8 +4,6 @@ import {
|
|||||||
NLayoutContent,
|
NLayoutContent,
|
||||||
NLayoutSider,
|
NLayoutSider,
|
||||||
NPageHeader,
|
NPageHeader,
|
||||||
NBreadcrumb,
|
|
||||||
NBreadcrumbItem,
|
|
||||||
NSpace,
|
NSpace,
|
||||||
NButton,
|
NButton,
|
||||||
NDropdown,
|
NDropdown,
|
||||||
@ -41,11 +39,6 @@ defineProps({
|
|||||||
default: null,
|
default: null,
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
pageBreadcrumbs: {
|
|
||||||
type: Array<typeof NBreadcrumbItem>,
|
|
||||||
default: () => [],
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
defineEmits(['update:collapsed'])
|
defineEmits(['update:collapsed'])
|
||||||
@ -81,15 +74,6 @@ defineEmits(['update:collapsed'])
|
|||||||
content-style="display: flex; flex-direction: column;width: 100%;height:100%;padding: 10px"
|
content-style="display: flex; flex-direction: column;width: 100%;height:100%;padding: 10px"
|
||||||
>
|
>
|
||||||
<n-page-header :subtitle="pageSubtitle">
|
<n-page-header :subtitle="pageSubtitle">
|
||||||
<template #header>
|
|
||||||
<n-breadcrumb>
|
|
||||||
<Component
|
|
||||||
:is="breadcrumb"
|
|
||||||
v-for="(breadcrumb, index) in pageBreadcrumbs"
|
|
||||||
:key="index"
|
|
||||||
/>
|
|
||||||
</n-breadcrumb>
|
|
||||||
</template>
|
|
||||||
<template #avatar>
|
<template #avatar>
|
||||||
<n-icon size="large" :component="pageIcon" />
|
<n-icon size="large" :component="pageIcon" />
|
||||||
</template>
|
</template>
|
||||||
@ -98,7 +82,7 @@ defineEmits(['update:collapsed'])
|
|||||||
</template>
|
</template>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<n-space>
|
<n-space>
|
||||||
<n-button size="small">Button</n-button>
|
<n-button size="tiny">Button</n-button>
|
||||||
<n-dropdown placement="bottom-start">
|
<n-dropdown placement="bottom-start">
|
||||||
<n-button :bordered="false" style="padding: 0 4px">
|
<n-button :bordered="false" style="padding: 0 4px">
|
||||||
···
|
···
|
||||||
|
Loading…
x
Reference in New Issue
Block a user