Merge branch 'main' into zhufu
commit
991156d71c
|
|
@ -14,6 +14,8 @@ export const chartRoutes: RouteRecordRaw = {
|
|||
title: '工作空间',
|
||||
isRoot: true,
|
||||
noKeepAlive: true,
|
||||
hideBreadcrumb: true,
|
||||
hideMenu: true,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,5 +13,7 @@ export const editRoutes: RouteRecordRaw = {
|
|||
meta: {
|
||||
title: '编辑',
|
||||
isRoot: true,
|
||||
hideBreadcrumb: true,
|
||||
hideMenu: true,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,5 +13,7 @@ export const previewRoutes: RouteRecordRaw = {
|
|||
meta: {
|
||||
title: '预览',
|
||||
isRoot: true,
|
||||
hideBreadcrumb: true,
|
||||
hideMenu: true,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ export const projectRoutes: RouteRecordRaw = {
|
|||
meta: {
|
||||
title: '项目',
|
||||
isRoot: true,
|
||||
hideBreadcrumb: true,
|
||||
hideMenu: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,7 +21,14 @@ Object.keys(modules).forEach((key) => {
|
|||
}
|
||||
});
|
||||
|
||||
export const asyncRoutes = [PAGE_NOT_FOUND_ROUTE, ...routeModuleList];
|
||||
export const asyncRoutes = [
|
||||
PAGE_NOT_FOUND_ROUTE,
|
||||
...routeModuleList,
|
||||
projectRoutes,
|
||||
chartRoutes,
|
||||
previewRoutes,
|
||||
editRoutes,
|
||||
];
|
||||
|
||||
// 根路由
|
||||
export const RootRoute: AppRouteRecordRaw = {
|
||||
|
|
@ -31,7 +38,7 @@ export const RootRoute: AppRouteRecordRaw = {
|
|||
meta: {
|
||||
title: 'Root',
|
||||
},
|
||||
children: [projectRoutes, chartRoutes, previewRoutes, editRoutes],
|
||||
// children: [projectRoutes, chartRoutes, previewRoutes, editRoutes],
|
||||
};
|
||||
|
||||
export const LoginRoute: AppRouteRecordRaw = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
<template>
|
||||
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex"> 首页 </PageWrapper>
|
||||
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
|
||||
首页
|
||||
<button @click="handleClick">大屏配置页</button>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { reactive } from 'vue';
|
||||
import { router } from '@/router';
|
||||
|
||||
function handleClick() {
|
||||
router.push('/project/items');
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,31 +1,47 @@
|
|||
<template>
|
||||
<div @click="clickHandle">
|
||||
<n-tooltip v-if="collapsed" placement="right" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button ghost type="primary" size="small">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<DuplicateOutlineIcon v-show="designStore.getDarkTheme"></DuplicateOutlineIcon>
|
||||
<DuplicateIcon v-show="!designStore.getDarkTheme"></DuplicateIcon>
|
||||
</n-icon>
|
||||
</template>
|
||||
</n-button>
|
||||
</template>
|
||||
<span>
|
||||
{{ $t('project.create_btn') }}
|
||||
</span>
|
||||
</n-tooltip>
|
||||
<n-button v-else ghost type="primary">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<DuplicateOutlineIcon v-show="designStore.getDarkTheme"></DuplicateOutlineIcon>
|
||||
<DuplicateIcon v-show="!designStore.getDarkTheme"></DuplicateIcon>
|
||||
</n-icon>
|
||||
</template>
|
||||
<span>
|
||||
{{ $t('project.create_btn') }}
|
||||
</span>
|
||||
</n-button>
|
||||
<div class="layout-button">
|
||||
<div @click="goHomeHandle">
|
||||
<n-tooltip placement="right" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button ghost type="primary" size="small">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<home-icon />
|
||||
</n-icon>
|
||||
</template>
|
||||
</n-button>
|
||||
</template>
|
||||
<span> 后台管理 </span>
|
||||
</n-tooltip>
|
||||
</div>
|
||||
<div @click="clickHandle">
|
||||
<n-tooltip v-if="collapsed" placement="right" trigger="hover">
|
||||
<template #trigger>
|
||||
<n-button ghost type="primary" size="small">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<DuplicateOutlineIcon v-show="designStore.getDarkTheme"></DuplicateOutlineIcon>
|
||||
<DuplicateIcon v-show="!designStore.getDarkTheme"></DuplicateIcon>
|
||||
</n-icon>
|
||||
</template>
|
||||
</n-button>
|
||||
</template>
|
||||
<span>
|
||||
{{ $t('project.create_btn') }}
|
||||
</span>
|
||||
</n-tooltip>
|
||||
<n-button v-else ghost type="primary">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<DuplicateOutlineIcon v-show="designStore.getDarkTheme"></DuplicateOutlineIcon>
|
||||
<DuplicateIcon v-show="!designStore.getDarkTheme"></DuplicateIcon>
|
||||
</n-icon>
|
||||
</template>
|
||||
<span>
|
||||
{{ $t('project.create_btn') }}
|
||||
</span>
|
||||
</n-button>
|
||||
</div>
|
||||
</div>
|
||||
<CreateModal :show="modalShow" @close="closeHandle"></CreateModal>
|
||||
</template>
|
||||
|
|
@ -35,9 +51,11 @@
|
|||
import { CreateModal } from './components/CreateModal/index';
|
||||
import { icon } from '@/plugins';
|
||||
import { fetchPathByName, routerTurnByPath, getUUID } from '@/utils';
|
||||
import { ChartEnum } from '@/enums/pageEnum';
|
||||
import { ChartEnum, PageEnum } from '@/enums/pageEnum';
|
||||
import { createProjectApi } from '@/api/path';
|
||||
import { router } from '@/router';
|
||||
|
||||
const { HomeIcon } = icon.ionicons5;
|
||||
const { DuplicateIcon, DuplicateOutlineIcon } = icon.ionicons5;
|
||||
const designStore = useDesignStore();
|
||||
|
||||
|
|
@ -71,4 +89,16 @@
|
|||
const closeHandle = () => {
|
||||
modalShow.value = false;
|
||||
};
|
||||
const goHomeHandle = () => {
|
||||
router.replace(PageEnum.BASE_HOME);
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.layout-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
div:first-child {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue