create-young-proj 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. package/README.md +5 -3
  2. package/dist/index.mjs +9 -9
  3. package/package.json +1 -1
  4. package/template-nuxt-admin/Dockerfile +41 -0
  5. package/template-nuxt-admin/README.md +35 -0
  6. package/template-nuxt-admin/app.vue +41 -0
  7. package/template-nuxt-admin/boot.mjs +16 -0
  8. package/template-nuxt-admin/components/ScreenFull.vue +18 -0
  9. package/template-nuxt-admin/components/TopSearch.vue +73 -0
  10. package/template-nuxt-admin/components/TopUser.vue +69 -0
  11. package/template-nuxt-admin/components/YoungChangePassword.vue +87 -0
  12. package/template-nuxt-admin/components/YoungCodeInput.vue +60 -0
  13. package/template-nuxt-admin/components/YoungLink.vue +23 -0
  14. package/template-nuxt-admin/components/YoungLoading.vue +39 -0
  15. package/template-nuxt-admin/components/layout/Footer.vue +29 -0
  16. package/template-nuxt-admin/components/layout/Logo.vue +52 -0
  17. package/template-nuxt-admin/components/layout/Main.vue +41 -0
  18. package/template-nuxt-admin/components/layout/NavBar.vue +77 -0
  19. package/template-nuxt-admin/components/layout/SideBar.vue +90 -0
  20. package/template-nuxt-admin/components/layout/SubMenu.vue +46 -0
  21. package/template-nuxt-admin/components/layout/TabsBar.vue +183 -0
  22. package/template-nuxt-admin/composables/api.ts +104 -0
  23. package/template-nuxt-admin/composables/apis/delete.ts +37 -0
  24. package/template-nuxt-admin/composables/apis/get.ts +83 -0
  25. package/template-nuxt-admin/composables/apis/index.ts +10 -0
  26. package/template-nuxt-admin/composables/apis/patch.ts +74 -0
  27. package/template-nuxt-admin/composables/apis/post.ts +85 -0
  28. package/template-nuxt-admin/composables/config.ts +13 -0
  29. package/template-nuxt-admin/composables/icon.ts +27 -0
  30. package/template-nuxt-admin/composables/nav.ts +60 -0
  31. package/template-nuxt-admin/composables/tags.ts +108 -0
  32. package/template-nuxt-admin/composables/user.ts +29 -0
  33. package/template-nuxt-admin/config/.devrc +1 -0
  34. package/template-nuxt-admin/config/.onlinerc +1 -0
  35. package/template-nuxt-admin/config/.testrc +1 -0
  36. package/template-nuxt-admin/env.d.ts +47 -0
  37. package/template-nuxt-admin/error.vue +53 -0
  38. package/template-nuxt-admin/layouts/blank.vue +9 -0
  39. package/template-nuxt-admin/layouts/default.vue +124 -0
  40. package/template-nuxt-admin/middleware/auth.global.ts +39 -0
  41. package/template-nuxt-admin/nuxt.config.ts +101 -0
  42. package/template-nuxt-admin/package.json +44 -0
  43. package/template-nuxt-admin/pages/home/[id].vue +28 -0
  44. package/template-nuxt-admin/pages/index.vue +20 -0
  45. package/template-nuxt-admin/pages/login.vue +179 -0
  46. package/template-nuxt-admin/pages/system/api.vue +166 -0
  47. package/template-nuxt-admin/pages/system/hooks/useRole.ts +336 -0
  48. package/template-nuxt-admin/pages/system/menuList.vue +329 -0
  49. package/template-nuxt-admin/pages/system/role.vue +117 -0
  50. package/template-nuxt-admin/pages/system/user.vue +214 -0
  51. package/template-nuxt-admin/plugins/directive.ts +26 -0
  52. package/template-nuxt-admin/public/default_avatar.svg +1 -0
  53. package/template-nuxt-admin/public/favicon.ico +0 -0
  54. package/template-nuxt-admin/public/image_placeholder.svg +15 -0
  55. package/template-nuxt-admin/public/tabbar_bg.png +0 -0
  56. package/template-nuxt-admin/rome.json +26 -0
  57. package/template-nuxt-admin/server/api/[...all].ts +10 -0
  58. package/template-nuxt-admin/server/plugins/env.ts +89 -0
  59. package/template-nuxt-admin/server/routes/get/env.ts +13 -0
  60. package/template-nuxt-admin/server/tsconfig.json +3 -0
  61. package/template-nuxt-admin/server/utils/index.ts +35 -0
  62. package/template-nuxt-admin/styles/element.scss +30 -0
  63. package/template-nuxt-admin/styles/index.scss +59 -0
  64. package/template-nuxt-admin/styles/variable.scss +103 -0
  65. package/template-nuxt-admin/tsconfig.json +7 -0
  66. package/template-nuxt-admin/typings/global.d.ts +16 -0
  67. package/template-nuxt-admin/typings/system.d.ts +66 -0
  68. package/template-nuxt-admin/typings/user.d.ts +19 -0
  69. package/template-nuxt-admin/uno.config.ts +40 -0
  70. package/template-nuxt-admin/utils/tool.ts +207 -0
  71. package/template-nuxt-admin/yarn.lock +6849 -0
  72. package/template-uni-app/_npmrc +2 -0
  73. package/template-uni-app/src/layouts/tabbar.vue +6 -6
  74. package/template-uni-app/src/pages/index.vue +16 -12
  75. package/template-uni-app/src/pages/my.vue +7 -11
@@ -0,0 +1,108 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-07-21 17:13:59
4
+ * @LastEditTime: 2023-07-21 17:18:41
5
+ * @Description:
6
+ */
7
+ import type { RouteLocationNormalized } from 'vue-router';
8
+
9
+ type CachedView = string | symbol | null | undefined;
10
+
11
+ interface TagsViewState {
12
+ /**
13
+ * 访问过的页面,路由对象
14
+ */
15
+ visitedViews: RouteLocationNormalized[];
16
+ /**
17
+ * 已缓存的页面名称
18
+ */
19
+ cachedViews: CachedView[];
20
+ }
21
+ // @ts-ignore
22
+ export const useTagsStore = defineStore('useTagsStore', {
23
+ state: () => {
24
+ const state = reactive<TagsViewState>({
25
+ visitedViews: [],
26
+ cachedViews: [],
27
+ });
28
+ return state;
29
+ },
30
+ actions: {
31
+ /**
32
+ * 打开某个页面
33
+ */
34
+ addView(view: RouteLocationNormalized) {
35
+ if (view.path === '/') {
36
+ return;
37
+ }
38
+
39
+ // 非我族类其心必异,布局不是默认布局的页面,不缓存
40
+ if ((view.meta?.layout ?? 'default') !== 'default') {
41
+ return;
42
+ }
43
+ // 查询是否已经访问过
44
+ if (!this.visitedViews.some((v) => v.path === view.path)) {
45
+ // 添加到已访问
46
+ const { name, path, fullPath, meta } = view;
47
+ this.visitedViews.push({ name, path, fullPath, meta } as RouteLocationNormalized);
48
+ // 添加到缓存
49
+ this.addToCache(view);
50
+ }
51
+ },
52
+ /**
53
+ * 添加页面到缓存
54
+ */
55
+ addToCache(view: RouteLocationNormalized) {
56
+ // 查询该标签是否已缓存
57
+ if (this.cachedViews.includes(view.name)) {
58
+ null;
59
+ } else if (!view.meta?.noCache) {
60
+ this.cachedViews.push(view.name);
61
+ }
62
+ },
63
+ /**
64
+ * 关闭某个页面
65
+ */
66
+ delView(view: RouteLocationNormalized) {
67
+ // 固定页不能关闭
68
+ if (view.meta.affix) {
69
+ ElMessage.warning('固定页无法关闭!');
70
+ return false;
71
+ }
72
+ // 删除访问记录
73
+ const index = this.visitedViews.findIndex((r) => r.path === view.path);
74
+ index > -1 && this.visitedViews.splice(index, 1);
75
+ // 删除缓存
76
+ this.delCachedView(view);
77
+ return true;
78
+ },
79
+ /**
80
+ * 删除页面缓存
81
+ */
82
+ delCachedView(view: RouteLocationNormalized) {
83
+ const index = this.cachedViews.indexOf(view.name);
84
+ index > -1 && this.cachedViews.splice(index, 1);
85
+ },
86
+ /**
87
+ * 关闭其他页面
88
+ */
89
+ delOtherViews(view: RouteLocationNormalized) {
90
+ this.visitedViews = this.visitedViews.filter((v) => {
91
+ return v?.meta?.affix || v.path === view.path;
92
+ });
93
+ this.cachedViews = this.cachedViews.filter((v) => {
94
+ return v === view.name;
95
+ });
96
+ },
97
+ /**
98
+ * 关闭所有页面
99
+ */
100
+ delAllViews() {
101
+ const affixTags = this.visitedViews.filter((tag) => tag?.meta?.affix);
102
+ this.visitedViews = affixTags;
103
+ this.cachedViews.length = 0;
104
+ },
105
+ },
106
+ });
107
+
108
+ import.meta.hot && import.meta.hot.accept(acceptHMRUpdate(useTagsStore, import.meta.hot));
@@ -0,0 +1,29 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-06-21 12:03:42
4
+ * @LastEditTime: 2023-07-24 14:05:13
5
+ * @Description:
6
+ */
7
+ export const useUserStore = defineStore('useUserStore', () => {
8
+ const cookie = useLocalStorage<UserLoginRes>('token', {} as UserLoginRes);
9
+
10
+ const hasLogin = computed(() => !!cookie.value?.uuid);
11
+ const avatar = computed(() => cookie.value?.headimgurl);
12
+ const nick = computed(() => cookie.value?.nickname);
13
+ const token = computed(() => cookie.value?.token);
14
+
15
+ const SaveFlag = useLocalStorage('n天免登', true);
16
+
17
+ return {
18
+ cookie,
19
+ hasLogin,
20
+ avatar,
21
+ nick,
22
+ token,
23
+ SaveFlag,
24
+ };
25
+ });
26
+
27
+ if (import.meta.hot) {
28
+ import.meta.hot.accept(acceptHMRUpdate(useUserStore, import.meta.hot));
29
+ }
@@ -0,0 +1 @@
1
+ NUXT_PUBLIC_API_BASE = http://192.168.10.168:7001
@@ -0,0 +1 @@
1
+ NUXT_PUBLIC_API_BASE = http://192.168.10.168:9000
@@ -0,0 +1 @@
1
+ NUXT_PUBLIC_API_BASE = http://192.168.10.168:9000
@@ -0,0 +1,47 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-05-26 11:50:06
4
+ * @LastEditTime: 2023-07-24 10:31:33
5
+ * @Description:
6
+ */
7
+
8
+ /**
9
+ * 环境变量
10
+ */
11
+ interface ImportMetaEnv {
12
+ /**
13
+ * 当前版本
14
+ */
15
+ NUXT_PUBLIC_CURRENT_VERSION: string;
16
+ /**
17
+ * 后台服务器地址
18
+ */
19
+ NUXT_PUBLIC_API_BASE: string;
20
+ /**
21
+ * 后台标题
22
+ */
23
+ NUXT_PUBLIC_TITLE: string;
24
+ /**
25
+ * 后台副标题
26
+ */
27
+ NUXT_PUBLIC_SUB_TITLE?: string;
28
+ /**
29
+ * slogan
30
+ */
31
+ NUXT_PUBLIC_SLOGAN?: string;
32
+ /**
33
+ * 登录背景图
34
+ */
35
+ NUXT_PUBLIC_LOGIN_BG: string;
36
+ /**
37
+ * 后台 logo
38
+ */
39
+ NUXT_PUBLIC_LOGIN_LOGO: string;
40
+ };
41
+
42
+ declare interface Window {
43
+ /**
44
+ * 注入到前端使用的环境变量
45
+ */
46
+ __YOUNG_ENV__: ImportMetaEnv;
47
+ };
@@ -0,0 +1,53 @@
1
+ <!--
2
+ * @Author: zhangyang
3
+ * @Date: 2023-06-12 15:00:07
4
+ * @LastEditTime: 2023-07-31 12:10:16
5
+ * @Description:
6
+ -->
7
+ <script lang="ts" setup>
8
+ import type { NuxtError } from '#app';
9
+
10
+ const props = defineProps<{
11
+ error: NuxtError;
12
+ }>();
13
+
14
+ let timer: NodeJS.Timer;
15
+
16
+ const i = ref(5);
17
+
18
+ const clear = () => {
19
+ clearError();
20
+ clearInterval(timer);
21
+ location.replace('/');
22
+ };
23
+
24
+ const NotShowError = computed(() => {
25
+ return props.error.message === 'Request failed with status code 401';
26
+ });
27
+
28
+ onMounted(() => {
29
+ if (process.server) {
30
+ return;
31
+ }
32
+ console.log(props.error, props.error.statusCode);
33
+ if (process.dev) {
34
+ console.log('开发模式,不自动清理');
35
+ return;
36
+ }
37
+ timer = setInterval(() => {
38
+ i.value--;
39
+ if (i.value === 0) {
40
+ clear();
41
+ }
42
+ }, 1e3);
43
+ });
44
+ </script>
45
+ <template>
46
+ <div v-if="!NotShowError" class="flex w-full h-full flex-col justify-center items-center">
47
+ <div class="text-5xl my-6">{{ error.statusCode }}</div>
48
+ <div class="text-lg my-2">{{ error.message || error.statusMessage || '出错啦~' }}</div>
49
+
50
+ <div class="mb-2">{{ i }}s 后自动跳转首页</div>
51
+ <ElButton @click="clear">立即返回首页</ElButton>
52
+ </div>
53
+ </template>
@@ -0,0 +1,9 @@
1
+ <!--
2
+ * @Author: zhangyang
3
+ * @Date: 2023-07-21 13:53:10
4
+ * @LastEditTime: 2023-07-21 13:53:10
5
+ * @Description:
6
+ -->
7
+ <template>
8
+ <NuxtPage />
9
+ </template>
@@ -0,0 +1,124 @@
1
+ <!--
2
+ * @Author: zhangyang
3
+ * @Date: 2023-07-21 11:49:00
4
+ * @LastEditTime: 2023-07-28 17:41:44
5
+ * @Description:
6
+ -->
7
+ <script lang="ts" setup>
8
+ const { isCollapse } = storeToRefs(useNavStore());
9
+ const { enter, isSupported } = useFullscreen();
10
+
11
+ const fullTip = useLocalStorage('全屏提示', false);
12
+
13
+ onMounted(() => {
14
+ const { innerWidth, innerHeight } = window;
15
+ if (innerHeight > innerWidth) {
16
+ isCollapse.value = true;
17
+
18
+ if (fullTip.value) {
19
+ return;
20
+ }
21
+
22
+ if (!isSupported.value) {
23
+ showDialog({
24
+ title: '推荐使用场景',
25
+ message: '系统浏览器 + 横屏使用',
26
+ }).finally(() => fullTip.value = true);
27
+ } else {
28
+ showDialog({
29
+ title: '推荐使用场景',
30
+ message: '系统浏览器 + 全屏模式 + 横屏使用',
31
+ confirmButtonText: '进入全屏'
32
+ }).then(async () => {
33
+ try {
34
+ await enter();
35
+ } catch (e) {
36
+ showDialog({
37
+ message: '您的设备暂不支持全屏功能,请解锁系统方向锁定后横屏使用!'
38
+ });
39
+ }
40
+ }).catch(() => null).finally(() => fullTip.value = true);;
41
+ }
42
+ }
43
+ });
44
+ </script>
45
+
46
+ <template>
47
+ <div class="layout-admin-wrapper">
48
+ <!-- SubMenu -->
49
+ <LayoutSideBar />
50
+ <div class="layout-container-vertical" :class="{ 'is-collapse': isCollapse }">
51
+ <div class="layout-main">
52
+ <!-- Header -->
53
+ <div class="layout-header" :class="{ 'is-collapse': isCollapse }">
54
+ <LayoutNavBar />
55
+ <LayoutTabsBar lt-lg="!hidden" />
56
+ </div>
57
+ <div class="app-main-container">
58
+ <!-- Main -->
59
+ <LayoutMain />
60
+ <!-- Footer -->
61
+ <!-- <LayoutFooter /> -->
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </template>
67
+
68
+ <style scoped lang="scss">
69
+ .layout-admin-wrapper {
70
+ position: relative;
71
+ width: 100%;
72
+ height: 100%;
73
+ overflow: auto;
74
+
75
+ .layout-container-vertical {
76
+ margin-top: $base-header-height;
77
+ margin-left: $base-left-menu-width;
78
+
79
+ &.is-collapse {
80
+ margin-left: $base-left-menu-width-min;
81
+ border-right: 0;
82
+ }
83
+
84
+ .layout-main {
85
+ min-height: 100%;
86
+
87
+ .layout-header {
88
+ box-shadow: 0 1px 4px rgb(0 21 41 / 8%);
89
+ position: fixed;
90
+ top: 0;
91
+ right: 0;
92
+ z-index: $base-z-index - 2;
93
+ width: calc(100% - $base-left-menu-width);
94
+
95
+ &.is-collapse {
96
+ width: calc(100% - $base-left-menu-width-min);
97
+ }
98
+ }
99
+ }
100
+ }
101
+
102
+ @screen lt-lg {
103
+ .layout-container-vertical {
104
+ @apply block;
105
+ margin-left: 0;
106
+ // margin-left: $base-left-menu-width-min;
107
+ margin-top: $base-top-bar-height !important;
108
+
109
+ &.is-collapse {
110
+ @apply ml-0;
111
+ }
112
+
113
+ .layout-header {
114
+ // width: calc(100% - $base-left-menu-width-min) !important;
115
+ width: 100% !important;
116
+
117
+ // &.is-collapse {
118
+ // width: 100% !important;
119
+ // }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ </style>
@@ -0,0 +1,39 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-07-21 10:02:19
4
+ * @LastEditTime: 2023-07-31 12:16:20
5
+ * @Description:
6
+ */
7
+ export default defineNuxtRouteMiddleware(async (to, from) => {
8
+ if (to.matched.length === 0) {
9
+ throw createError({ message: '页面不存在', statusCode: 404 });
10
+ }
11
+
12
+ const { addView } = useTagsStore();
13
+
14
+ // 页面无需登录
15
+ if (to.meta.auth === false) {
16
+ addView(to);
17
+ return;
18
+ }
19
+
20
+ const { hasLogin } = storeToRefs(useUserStore());
21
+ const { nav_arr } = storeToRefs(useNavStore());
22
+
23
+ if (!hasLogin.value && to.path !== '/login') {
24
+ // 页面需要登录,但是未登录
25
+ showFailToast('未登录或登录过期,请重新登录');
26
+ return navigateTo(`/login?redirect=${encodeURIComponent(to.fullPath)}`);
27
+ } else if (hasLogin.value && to.path === '/login') {
28
+ // 已登录进入登录页
29
+ return navigateTo('/');
30
+ } else {
31
+ nav_arr.value.length === 0 && (await generateNavData());
32
+ if (hasPermission(to.path)) {
33
+ addView(to);
34
+ return;
35
+ } else {
36
+ throw createError({ message: '无权限,请联系系统管理员', statusCode: 403 });
37
+ }
38
+ }
39
+ });
@@ -0,0 +1,101 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-05-25 19:45:20
4
+ * @LastEditTime: 2023-07-28 17:35:11
5
+ * @Description:
6
+ */
7
+ import { resolve } from 'node:path';
8
+
9
+ // https://nuxt.com/docs/api/configuration/nuxt-config
10
+ export default defineNuxtConfig({
11
+ ssr: false,
12
+ app: {
13
+ head: {
14
+ viewport: 'width=device-width,initial-scale=1.0,user-scalable=no,shrink-to-fit=no',
15
+ meta: [
16
+ { name: 'theme-color', content: '#ffffff' },
17
+ { name: 'screen-orientation', content: 'portrait' },
18
+ { name: 'x5-orientation', content: 'portrait' },
19
+ { name: 'renderer', content: 'webkit' },
20
+ { name: 'mobile-web-app-capable', content: 'yes' },
21
+ { name: 'creator', content: 'BluesYoung-web' },
22
+ ],
23
+ link: [
24
+ {
25
+ rel: 'preload',
26
+ as: 'image',
27
+ href: '/image_placeholder.svg',
28
+ },
29
+ {
30
+ rel: 'preload',
31
+ as: 'image',
32
+ href: '/tabbar_bg.png',
33
+ },
34
+ ],
35
+ script: [
36
+ {
37
+ innerHTML: `
38
+ this.globalThis || (this.globalThis = this);
39
+ window.onerror = function(e) {
40
+ if (e.toString().includes('ResizeObserver loop')) {
41
+ return;
42
+ }
43
+ console.log(e);
44
+ window.alert('您的浏览器版本过低,请尝试使用其他浏览器或将浏览器升级至最新版本后重试!');
45
+ window.alert(e);
46
+ }
47
+ `,
48
+ },
49
+ ],
50
+ },
51
+ },
52
+
53
+ lazyLoad: {
54
+ audio: false,
55
+ // 默认使用原生的 loading="lazy"
56
+ // native: true,
57
+ // js 实现,仅指令生效 v-lazy-load
58
+ // directiveOnly: true,
59
+ // @ts-ignore js 实现的占位图
60
+ defaultImage: '/image_placeholder.svg',
61
+ },
62
+
63
+ nitro: {
64
+ output: {
65
+ dir: resolve(__dirname, './dist'),
66
+ },
67
+ },
68
+
69
+ devtools: {
70
+ enabled: true,
71
+ },
72
+
73
+ modules: [
74
+ '@vueuse/nuxt',
75
+ '@unocss/nuxt',
76
+ '@element-plus/nuxt',
77
+ '@pinia/nuxt',
78
+ '@vant/nuxt',
79
+ 'nuxt-lazy-load',
80
+ ],
81
+
82
+ pinia: {
83
+ autoImports: ['defineStore', 'storeToRefs', 'acceptHMRUpdate'],
84
+ },
85
+
86
+ vite: {
87
+ build: {
88
+ // 兼容钉钉浏览器
89
+ target: 'es2015',
90
+ sourcemap: false,
91
+ },
92
+ css: {
93
+ preprocessorOptions: {
94
+ scss: {
95
+ javascriptEnabled: true,
96
+ additionalData: '@import "~/styles/variable.scss";',
97
+ },
98
+ },
99
+ },
100
+ },
101
+ });
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "nuxt-app",
3
+ "private": true,
4
+ "scripts": {
5
+ "build": "nuxt build",
6
+ "dev": "nuxt dev",
7
+ "generate": "nuxt generate",
8
+ "preview": "nuxt preview",
9
+ "postinstall": "nuxt prepare"
10
+ },
11
+ "devDependencies": {
12
+ "@bluesyoung/logger": "^0.0.1",
13
+ "@element-plus/nuxt": "^1.0.5",
14
+ "@iconify/json": "^2.2.93",
15
+ "@nuxt/devtools": "^0.7.2",
16
+ "@pinia/nuxt": "^0.4.11",
17
+ "@types/file-saver": "^2.0.5",
18
+ "@types/node": "18",
19
+ "@types/qrcode": "^1.5.1",
20
+ "@unocss/nuxt": "^0.53.5",
21
+ "@vant/nuxt": "^1.0.2",
22
+ "@vueuse/nuxt": "^10.2.1",
23
+ "dayjs": "^1.11.9",
24
+ "element-plus": "^2.3.8",
25
+ "nuxt": "^3.6.5",
26
+ "nuxt-lazy-load": "^3.0.4",
27
+ "pinia": "^2.1.4",
28
+ "sass": "^1.64.0",
29
+ "vant": "^4.6.2"
30
+ },
31
+ "dependencies": {
32
+ "@bluesyoung/http": "0.3.1",
33
+ "@bluesyoung/ui-vue3": "^0.1.1",
34
+ "@bluesyoung/ui-vue3-element-plus": "0.11.1",
35
+ "@bluesyoung/utils": "^0.1.0",
36
+ "c12": "^1.4.2",
37
+ "file-saver": "^2.0.5",
38
+ "http-proxy": "^1.18.1",
39
+ "jszip": "^3.10.1",
40
+ "qrcode": "^1.5.3",
41
+ "sortablejs": "^1.15.0",
42
+ "vue-cropper": "^0.6.2"
43
+ }
44
+ }
@@ -0,0 +1,28 @@
1
+ <!--
2
+ * @Author: zhangyang
3
+ * @Date: 2023-07-21 17:35:12
4
+ * @LastEditTime: 2023-07-28 11:34:29
5
+ * @Description:
6
+ -->
7
+ <script lang="ts" setup>
8
+ definePageMeta({
9
+ title: '工作台',
10
+ auth: false,
11
+ noCache: true
12
+ });
13
+
14
+ const { nick } = storeToRefs(useUserStore());
15
+ const { nav_arr } = storeToRefs(useNavStore());
16
+
17
+ onMounted(() => {
18
+ nav_arr.value.length === 0 && generateNavData();
19
+ });
20
+ </script>
21
+
22
+ <template>
23
+ <div>
24
+ <div class="text-4xl my-20px text-center font-bold">
25
+ 欢迎回来,{{ nick }}
26
+ </div>
27
+ </div>
28
+ </template>
@@ -0,0 +1,20 @@
1
+ <!--
2
+ * @Author: zhangyang
3
+ * @Date: 2023-07-21 09:27:14
4
+ * @LastEditTime: 2023-07-23 16:23:00
5
+ * @Description:
6
+ -->
7
+ <script setup lang="ts">
8
+ definePageMeta({
9
+ noCache: true
10
+ });
11
+
12
+ navigateTo({
13
+ path: '/home/index',
14
+ replace: true
15
+ });
16
+ </script>
17
+
18
+ <template>
19
+ <div />
20
+ </template>