create-young-proj 0.0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +13 -2
  3. package/dist/index.mjs +18 -18
  4. package/index.mjs +3 -3
  5. package/package.json +10 -12
  6. package/template-admin-server/.editorconfig +11 -0
  7. package/template-admin-server/.nvmrc +1 -0
  8. package/template-admin-server/.vscode/extensions.json +6 -0
  9. package/template-admin-server/.vscode/settings.json +4 -0
  10. package/template-admin-server/README.md +73 -0
  11. package/template-admin-server/_gitignore +15 -0
  12. package/template-admin-server/boot.mjs +11 -0
  13. package/template-admin-server/package.json +60 -0
  14. package/template-admin-server/rome.json +22 -0
  15. package/template-admin-server/src/config/config.default.ts +56 -0
  16. package/template-admin-server/src/configuration.ts +47 -0
  17. package/template-admin-server/src/controller/admin.controller.ts +397 -0
  18. package/template-admin-server/src/controller/api.controller.ts +98 -0
  19. package/template-admin-server/src/controller/base.controller.ts +70 -0
  20. package/template-admin-server/src/controller/dto/api.ts +47 -0
  21. package/template-admin-server/src/controller/dto/index.ts +36 -0
  22. package/template-admin-server/src/controller/dto/menu.ts +41 -0
  23. package/template-admin-server/src/controller/dto/role.ts +41 -0
  24. package/template-admin-server/src/controller/dto/user.ts +52 -0
  25. package/template-admin-server/src/controller/menu.controller.ts +138 -0
  26. package/template-admin-server/src/controller/role.controller.ts +116 -0
  27. package/template-admin-server/src/controller/user.controller.ts +108 -0
  28. package/template-admin-server/src/entities/Api.ts +29 -0
  29. package/template-admin-server/src/entities/BaseCreate.ts +30 -0
  30. package/template-admin-server/src/entities/Menu.ts +39 -0
  31. package/template-admin-server/src/entities/Role.ts +36 -0
  32. package/template-admin-server/src/entities/User.ts +35 -0
  33. package/template-admin-server/src/entities/index.ts +10 -0
  34. package/template-admin-server/src/filter/default.filter.ts +22 -0
  35. package/template-admin-server/src/filter/notfound.filter.ts +23 -0
  36. package/template-admin-server/src/middleware/helper.middleware.ts +28 -0
  37. package/template-admin-server/src/middleware/index.ts +9 -0
  38. package/template-admin-server/src/middleware/jwt.middleware.ts +32 -0
  39. package/template-admin-server/src/middleware/report.middleware.ts +26 -0
  40. package/template-admin-server/src/service/api.service.ts +174 -0
  41. package/template-admin-server/src/service/basic.ts +118 -0
  42. package/template-admin-server/src/service/index.ts +10 -0
  43. package/template-admin-server/src/service/menu.service.ts +139 -0
  44. package/template-admin-server/src/service/role.service.ts +286 -0
  45. package/template-admin-server/src/service/user.service.ts +124 -0
  46. package/template-admin-server/src/strategy/jwt.strategy.ts +26 -0
  47. package/template-admin-server/src/types/index.ts +42 -0
  48. package/template-admin-server/src/types/types.d.ts +31 -0
  49. package/template-admin-server/tsconfig.json +24 -0
  50. package/template-vue-admin/.vscode/extensions.json +10 -0
  51. package/template-vue-admin/.vscode/list-add.code-snippets +108 -0
  52. package/template-vue-admin/.vscode/list-export.code-snippets +72 -0
  53. package/template-vue-admin/.vscode/list.code-snippets +61 -0
  54. package/template-vue-admin/.vscode/settings.json +7 -0
  55. package/template-vue-admin/Dockerfile +42 -0
  56. package/template-vue-admin/README.md +75 -0
  57. package/template-vue-admin/_env +8 -0
  58. package/template-vue-admin/_gitignore +30 -0
  59. package/template-vue-admin/boot.mjs +16 -0
  60. package/template-vue-admin/build/custom-plugin.ts +30 -0
  61. package/template-vue-admin/build/index.ts +7 -0
  62. package/template-vue-admin/build/plugins.ts +59 -0
  63. package/template-vue-admin/config/.devrc +2 -0
  64. package/template-vue-admin/config/.onlinerc +2 -0
  65. package/template-vue-admin/config/.testrc +2 -0
  66. package/template-vue-admin/index.html +21 -0
  67. package/template-vue-admin/nitro.config.ts +19 -0
  68. package/template-vue-admin/package.json +50 -0
  69. package/template-vue-admin/plugins/env.ts +26 -0
  70. package/template-vue-admin/public/vite.svg +1 -0
  71. package/template-vue-admin/rome.json +26 -0
  72. package/template-vue-admin/routes/api/[...all].ts +49 -0
  73. package/template-vue-admin/routes/get/env.ts +18 -0
  74. package/template-vue-admin/src/App.vue +14 -0
  75. package/template-vue-admin/src/apis/delete.ts +36 -0
  76. package/template-vue-admin/src/apis/get.ts +84 -0
  77. package/template-vue-admin/src/apis/index.ts +10 -0
  78. package/template-vue-admin/src/apis/patch.ts +79 -0
  79. package/template-vue-admin/src/apis/post.ts +77 -0
  80. package/template-vue-admin/src/assets/img/login_background.jpg +0 -0
  81. package/template-vue-admin/src/auto-components.d.ts +36 -0
  82. package/template-vue-admin/src/auto-imports.d.ts +282 -0
  83. package/template-vue-admin/src/layouts/blank.vue +9 -0
  84. package/template-vue-admin/src/layouts/default/components/Link.vue +23 -0
  85. package/template-vue-admin/src/layouts/default/components/Logo.vue +20 -0
  86. package/template-vue-admin/src/layouts/default/components/Menu.vue +54 -0
  87. package/template-vue-admin/src/layouts/default/components/NavSearch.vue +52 -0
  88. package/template-vue-admin/src/layouts/default/components/ScrollPane.vue +79 -0
  89. package/template-vue-admin/src/layouts/default/components/TagsView.vue +137 -0
  90. package/template-vue-admin/src/layouts/default/components/TopMenu.vue +21 -0
  91. package/template-vue-admin/src/layouts/default/components/UserCenter.vue +50 -0
  92. package/template-vue-admin/src/layouts/default/index.vue +95 -0
  93. package/template-vue-admin/src/main.ts +44 -0
  94. package/template-vue-admin/src/modules/1-router.ts +66 -0
  95. package/template-vue-admin/src/modules/2-pinia.ts +10 -0
  96. package/template-vue-admin/src/modules/3-net.ts +75 -0
  97. package/template-vue-admin/src/modules/4-auth.ts +126 -0
  98. package/template-vue-admin/src/shims.d.ts +12 -0
  99. package/template-vue-admin/src/stores/index.ts +9 -0
  100. package/template-vue-admin/src/stores/local/index.ts +23 -0
  101. package/template-vue-admin/src/stores/session/index.ts +63 -0
  102. package/template-vue-admin/src/stores/tags.ts +109 -0
  103. package/template-vue-admin/src/typings/global.d.ts +70 -0
  104. package/template-vue-admin/src/typings/index.ts +50 -0
  105. package/template-vue-admin/src/views/403.vue +32 -0
  106. package/template-vue-admin/src/views/[...all_404].vue +556 -0
  107. package/template-vue-admin/src/views/base/login.vue +193 -0
  108. package/template-vue-admin/src/views/dashboard/[name].vue +23 -0
  109. package/template-vue-admin/src/views/index.vue +19 -0
  110. package/template-vue-admin/src/views/system/api.vue +161 -0
  111. package/template-vue-admin/src/views/system/hooks/useRole.ts +286 -0
  112. package/template-vue-admin/src/views/system/menuList.vue +195 -0
  113. package/template-vue-admin/src/views/system/role.vue +132 -0
  114. package/template-vue-admin/src/views/system/user.vue +193 -0
  115. package/template-vue-admin/src/vite-env.d.ts +52 -0
  116. package/template-vue-admin/tsconfig.json +21 -0
  117. package/template-vue-admin/tsconfig.node.json +9 -0
  118. package/template-vue-admin/unocss.config.ts +47 -0
  119. package/template-vue-admin/vite.config.ts +32 -0
  120. package/template-vue-thin/package.json +14 -13
  121. package/template-vue-thin/vite.config.ts +1 -6
@@ -0,0 +1,36 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-01-06 10:50:53
4
+ * @LastEditTime: 2023-01-06 14:08:45
5
+ * @Description:
6
+ */
7
+ import { http } from '@/modules/3-net';
8
+
9
+ const method = 'DELETE';
10
+
11
+ const del = async (url: string, ids: string) => {
12
+ await http.authReq({
13
+ url,
14
+ method,
15
+ data: { ids },
16
+ });
17
+ };
18
+
19
+ export const useDeleteReq = () => ({
20
+ /**
21
+ * 删除用户
22
+ */
23
+ deleteUser: async (ids: string) => del('/user/delete/batch', ids),
24
+ /**
25
+ * 删除菜单
26
+ */
27
+ deleteMenu: async (ids: string) => del('/menu/delete/batch', ids),
28
+ /**
29
+ * 删除接口
30
+ */
31
+ deleteApi: async (ids: string) => del('/api/delete/batch', ids),
32
+ /**
33
+ * 删除角色
34
+ */
35
+ deleteRole: async (ids: string) => del('/role/delete/batch', ids),
36
+ });
@@ -0,0 +1,84 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-01-04 19:31:22
4
+ * @LastEditTime: 2023-01-09 09:07:32
5
+ * @Description:
6
+ */
7
+ import { http } from '@/modules/3-net';
8
+ import { useNavStore } from '@/stores';
9
+ import { ApiItem } from '@/typings';
10
+
11
+ const method = 'GET';
12
+
13
+ export const useGetReq = () => ({
14
+ /**
15
+ * 获取当前用户的菜单树
16
+ */
17
+ getMenuTree: async (force = false) => {
18
+ const { RawNav } = useNavStore();
19
+ if (!force && RawNav.value.length > 0) {
20
+ return Promise.resolve(RawNav.value);
21
+ }
22
+ return http.authReq<Record<number, NavArrItem>>({
23
+ url: '/menu/tree',
24
+ method,
25
+ });
26
+ },
27
+ /**
28
+ * 获取角色列表
29
+ */
30
+ getRoleList: async (params: Partial<BaseQuery> = {}) =>
31
+ http.authReq<PagesData>({
32
+ url: `/role/list`,
33
+ params,
34
+ method,
35
+ }),
36
+ /**
37
+ * 获取用户列表
38
+ */
39
+ getUserList: async (params: Partial<BaseQuery> = {}) =>
40
+ http.authReq<PagesData>({
41
+ url: '/user/list',
42
+ method,
43
+ params,
44
+ }),
45
+ /**
46
+ * 获取菜单列表
47
+ */
48
+ getMenuList: async () =>
49
+ http.authReq<Record<string, NavArrItem>>({
50
+ url: '/menu/list',
51
+ method,
52
+ }),
53
+ /**
54
+ * 获取接口列表
55
+ */
56
+ getApiList: async (params: Partial<BaseQuery> = {}) =>
57
+ http.authReq<PagesData>({
58
+ url: '/api/list',
59
+ method,
60
+ params,
61
+ }),
62
+ /**
63
+ * 获取角色拥有权限的菜单
64
+ */
65
+ getRoleMenuTree: async (id: number) =>
66
+ http.authReq<{
67
+ list: NavArrItem[];
68
+ accessIds: number[];
69
+ }>({
70
+ url: `/menu/all/${id}`,
71
+ method,
72
+ }),
73
+ /**
74
+ * 获取角色拥有的接口权限
75
+ */
76
+ getRoleApis: async (id: number) =>
77
+ http.authReq<{
78
+ list: ApiItem[];
79
+ accessIds: number[];
80
+ }>({
81
+ url: `/api/all/category/${id}`,
82
+ method,
83
+ }),
84
+ });
@@ -0,0 +1,10 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-01-04 11:35:30
4
+ * @LastEditTime: 2023-01-06 10:50:45
5
+ * @Description:
6
+ */
7
+ export * from './get';
8
+ export * from './post';
9
+ export * from './patch';
10
+ export * from './delete';
@@ -0,0 +1,79 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-01-04 19:31:22
4
+ * @LastEditTime: 2023-01-06 16:50:47
5
+ * @Description:
6
+ */
7
+ import { http } from '@/modules/3-net';
8
+ import type { ApiItem, RoleItem, UserItem } from '@/typings';
9
+
10
+ const method = 'PATCH';
11
+
12
+ export const usePatchReq = () => ({
13
+ /**
14
+ * 更新用户信息
15
+ */
16
+ changeUserItem: async ({ id, ...data }: Partial<UserItem>) => {
17
+ await http.authReq({
18
+ url: `/user/update/${id}`,
19
+ method,
20
+ data,
21
+ });
22
+ },
23
+ /**
24
+ * 更新菜单信息
25
+ */
26
+ changeMenuItem: async ({ id, ...data }: Partial<NavArrItem>) => {
27
+ await http.authReq({
28
+ url: `/menu/update/${id}`,
29
+ method,
30
+ data,
31
+ });
32
+ },
33
+ /**
34
+ * 更新接口
35
+ */
36
+ changeApiItem: async ({ id, ...data }: Partial<ApiItem>) => {
37
+ await http.authReq({
38
+ url: `/api/update/${id}`,
39
+ method,
40
+ data,
41
+ });
42
+ },
43
+ /**
44
+ * 更新角色
45
+ */
46
+ changeRoleItem: async ({ id, ...data }: Partial<RoleItem>) => {
47
+ await http.authReq({
48
+ url: `/role/update/${id}`,
49
+ method,
50
+ data,
51
+ });
52
+ },
53
+ /**
54
+ * 更新角色菜单权限
55
+ */
56
+ changeRoleMenu: async (roleId: number, add: number[], del: number[]) => {
57
+ await http.authReq({
58
+ url: `role/menus/update/${roleId}`,
59
+ method,
60
+ data: {
61
+ create: add,
62
+ delete: del,
63
+ },
64
+ });
65
+ },
66
+ /**
67
+ * 更新角色接口权限
68
+ */
69
+ changeRoleApi: async (roleId: number, add: number[], del: number[]) => {
70
+ await http.authReq({
71
+ url: `role/apis/update/${roleId}`,
72
+ method,
73
+ data: {
74
+ create: add,
75
+ delete: del,
76
+ },
77
+ });
78
+ },
79
+ });
@@ -0,0 +1,77 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-01-04 11:33:12
4
+ * @LastEditTime: 2023-01-09 09:06:55
5
+ * @Description:
6
+ */
7
+ import { http } from '@/modules/3-net';
8
+ import { useUserStore } from '@/stores';
9
+ import type { ApiItem, RoleItem, UserItem } from '@/typings';
10
+
11
+ export const usePostReq = () => ({
12
+ /**
13
+ * 登录
14
+ */
15
+ login: async (data: {
16
+ /**
17
+ * 用户名
18
+ */
19
+ username: string;
20
+ /**
21
+ * 密码
22
+ */
23
+ password: string;
24
+ }) =>
25
+ http.freeReq<UserKey>({
26
+ url: '/base/login',
27
+ data,
28
+ }),
29
+ /**
30
+ * 获取当前用户的信息
31
+ */
32
+ getCurrUserInfo: async () => {
33
+ const { CurrUserInfo } = useUserStore();
34
+ if (CurrUserInfo.value.id) {
35
+ return Promise.resolve(CurrUserInfo.value);
36
+ }
37
+ return http.authReq<CurrUserInfo>({
38
+ url: '/user/info',
39
+ });
40
+ },
41
+ /**
42
+ * 创建用户
43
+ */
44
+ addUserItem: async (data: UserItem) => {
45
+ await http.authReq({
46
+ url: '/user/create',
47
+ data,
48
+ });
49
+ },
50
+ /**
51
+ * 创建菜单
52
+ */
53
+ addMenuItem: async (data: NavArrItem) => {
54
+ await http.authReq({
55
+ url: '/menu/create',
56
+ data,
57
+ });
58
+ },
59
+ /**
60
+ * 创建接口
61
+ */
62
+ addApiItem: async (data: ApiItem) => {
63
+ await http.authReq({
64
+ url: '/api/create',
65
+ data,
66
+ });
67
+ },
68
+ /**
69
+ * 创建角色
70
+ */
71
+ addRoleItem: async (data: RoleItem) => {
72
+ await http.authReq({
73
+ url: '/role/create',
74
+ data,
75
+ });
76
+ },
77
+ });
@@ -0,0 +1,36 @@
1
+ // generated by unplugin-vue-components
2
+ // We suggest you to commit this file into source control
3
+ // Read more: https://github.com/vuejs/core/pull/3399
4
+ import '@vue/runtime-core'
5
+
6
+ export {}
7
+
8
+ declare module '@vue/runtime-core' {
9
+ export interface GlobalComponents {
10
+ ElAvatar: typeof import('element-plus/es')['ElAvatar']
11
+ ElButton: typeof import('element-plus/es')['ElButton']
12
+ ElCard: typeof import('element-plus/es')['ElCard']
13
+ ElCascader: typeof import('element-plus/es')['ElCascader']
14
+ ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
15
+ ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
16
+ ElDropdown: typeof import('element-plus/es')['ElDropdown']
17
+ ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
18
+ ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
19
+ ElForm: typeof import('element-plus/es')['ElForm']
20
+ ElFormItem: typeof import('element-plus/es')['ElFormItem']
21
+ ElInput: typeof import('element-plus/es')['ElInput']
22
+ ElMenu: typeof import('element-plus/es')['ElMenu']
23
+ ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
24
+ ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup']
25
+ ElOption: typeof import('element-plus/es')['ElOption']
26
+ ElResult: typeof import('element-plus/es')['ElResult']
27
+ ElSelect: typeof import('element-plus/es')['ElSelect']
28
+ ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
29
+ ElSwitch: typeof import('element-plus/es')['ElSwitch']
30
+ ElTable: typeof import('element-plus/es')['ElTable']
31
+ ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
32
+ ElTag: typeof import('element-plus/es')['ElTag']
33
+ RouterLink: typeof import('vue-router')['RouterLink']
34
+ RouterView: typeof import('vue-router')['RouterView']
35
+ }
36
+ }
@@ -0,0 +1,282 @@
1
+ // Generated by 'unplugin-auto-import'
2
+ export {}
3
+ declare global {
4
+ const EffectScope: typeof import('vue')['EffectScope']
5
+ const ElLoadingService: typeof import('element-plus')['ElLoadingService']
6
+ const ElMessage: typeof import('element-plus')['ElMessage']
7
+ const ElMessageBox: typeof import('element-plus')['ElMessageBox']
8
+ const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
9
+ const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
10
+ const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
11
+ const computed: typeof import('vue')['computed']
12
+ const computedAsync: typeof import('@vueuse/core')['computedAsync']
13
+ const computedEager: typeof import('@vueuse/core')['computedEager']
14
+ const computedInject: typeof import('@vueuse/core')['computedInject']
15
+ const computedWithControl: typeof import('@vueuse/core')['computedWithControl']
16
+ const controlledComputed: typeof import('@vueuse/core')['controlledComputed']
17
+ const controlledRef: typeof import('@vueuse/core')['controlledRef']
18
+ const createApp: typeof import('vue')['createApp']
19
+ const createEventHook: typeof import('@vueuse/core')['createEventHook']
20
+ const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
21
+ const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
22
+ const createPinia: typeof import('pinia')['createPinia']
23
+ const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
24
+ const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
25
+ const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
26
+ const customRef: typeof import('vue')['customRef']
27
+ const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
28
+ const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
29
+ const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
30
+ const defineComponent: typeof import('vue')['defineComponent']
31
+ const defineStore: typeof import('pinia')['defineStore']
32
+ const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
33
+ const effectScope: typeof import('vue')['effectScope']
34
+ const extendRef: typeof import('@vueuse/core')['extendRef']
35
+ const getActivePinia: typeof import('pinia')['getActivePinia']
36
+ const getCurrentInstance: typeof import('vue')['getCurrentInstance']
37
+ const getCurrentScope: typeof import('vue')['getCurrentScope']
38
+ const h: typeof import('vue')['h']
39
+ const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
40
+ const inject: typeof import('vue')['inject']
41
+ const isDefined: typeof import('@vueuse/core')['isDefined']
42
+ const isProxy: typeof import('vue')['isProxy']
43
+ const isReactive: typeof import('vue')['isReactive']
44
+ const isReadonly: typeof import('vue')['isReadonly']
45
+ const isRef: typeof import('vue')['isRef']
46
+ const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
47
+ const mapActions: typeof import('pinia')['mapActions']
48
+ const mapGetters: typeof import('pinia')['mapGetters']
49
+ const mapState: typeof import('pinia')['mapState']
50
+ const mapStores: typeof import('pinia')['mapStores']
51
+ const mapWritableState: typeof import('pinia')['mapWritableState']
52
+ const markRaw: typeof import('vue')['markRaw']
53
+ const nextTick: typeof import('vue')['nextTick']
54
+ const onActivated: typeof import('vue')['onActivated']
55
+ const onBeforeMount: typeof import('vue')['onBeforeMount']
56
+ const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
57
+ const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
58
+ const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
59
+ const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
60
+ const onClickOutside: typeof import('@vueuse/core')['onClickOutside']
61
+ const onDeactivated: typeof import('vue')['onDeactivated']
62
+ const onErrorCaptured: typeof import('vue')['onErrorCaptured']
63
+ const onKeyStroke: typeof import('@vueuse/core')['onKeyStroke']
64
+ const onLongPress: typeof import('@vueuse/core')['onLongPress']
65
+ const onMounted: typeof import('vue')['onMounted']
66
+ const onRenderTracked: typeof import('vue')['onRenderTracked']
67
+ const onRenderTriggered: typeof import('vue')['onRenderTriggered']
68
+ const onScopeDispose: typeof import('vue')['onScopeDispose']
69
+ const onServerPrefetch: typeof import('vue')['onServerPrefetch']
70
+ const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
71
+ const onUnmounted: typeof import('vue')['onUnmounted']
72
+ const onUpdated: typeof import('vue')['onUpdated']
73
+ const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
74
+ const provide: typeof import('vue')['provide']
75
+ const reactify: typeof import('@vueuse/core')['reactify']
76
+ const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
77
+ const reactive: typeof import('vue')['reactive']
78
+ const reactiveComputed: typeof import('@vueuse/core')['reactiveComputed']
79
+ const reactiveOmit: typeof import('@vueuse/core')['reactiveOmit']
80
+ const reactivePick: typeof import('@vueuse/core')['reactivePick']
81
+ const readonly: typeof import('vue')['readonly']
82
+ const ref: typeof import('vue')['ref']
83
+ const refAutoReset: typeof import('@vueuse/core')['refAutoReset']
84
+ const refDebounced: typeof import('@vueuse/core')['refDebounced']
85
+ const refDefault: typeof import('@vueuse/core')['refDefault']
86
+ const refThrottled: typeof import('@vueuse/core')['refThrottled']
87
+ const refWithControl: typeof import('@vueuse/core')['refWithControl']
88
+ const resolveComponent: typeof import('vue')['resolveComponent']
89
+ const resolveDirective: typeof import('vue')['resolveDirective']
90
+ const resolveRef: typeof import('@vueuse/core')['resolveRef']
91
+ const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
92
+ const setActivePinia: typeof import('pinia')['setActivePinia']
93
+ const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
94
+ const shallowReactive: typeof import('vue')['shallowReactive']
95
+ const shallowReadonly: typeof import('vue')['shallowReadonly']
96
+ const shallowRef: typeof import('vue')['shallowRef']
97
+ const storeToRefs: typeof import('pinia')['storeToRefs']
98
+ const syncRef: typeof import('@vueuse/core')['syncRef']
99
+ const syncRefs: typeof import('@vueuse/core')['syncRefs']
100
+ const templateRef: typeof import('@vueuse/core')['templateRef']
101
+ const throttledRef: typeof import('@vueuse/core')['throttledRef']
102
+ const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
103
+ const toRaw: typeof import('vue')['toRaw']
104
+ const toReactive: typeof import('@vueuse/core')['toReactive']
105
+ const toRef: typeof import('vue')['toRef']
106
+ const toRefs: typeof import('vue')['toRefs']
107
+ const triggerRef: typeof import('vue')['triggerRef']
108
+ const tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount']
109
+ const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount']
110
+ const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
111
+ const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose']
112
+ const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted']
113
+ const unref: typeof import('vue')['unref']
114
+ const unrefElement: typeof import('@vueuse/core')['unrefElement']
115
+ const until: typeof import('@vueuse/core')['until']
116
+ const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
117
+ const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
118
+ const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
119
+ const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
120
+ const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
121
+ const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
122
+ const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
123
+ const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
124
+ const useArraySome: typeof import('@vueuse/core')['useArraySome']
125
+ const useArrayUnique: typeof import('@vueuse/core')['useArrayUnique']
126
+ const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
127
+ const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
128
+ const useAttrs: typeof import('vue')['useAttrs']
129
+ const useBase64: typeof import('@vueuse/core')['useBase64']
130
+ const useBattery: typeof import('@vueuse/core')['useBattery']
131
+ const useBluetooth: typeof import('@vueuse/core')['useBluetooth']
132
+ const useBreakpoints: typeof import('@vueuse/core')['useBreakpoints']
133
+ const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel']
134
+ const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
135
+ const useCached: typeof import('@vueuse/core')['useCached']
136
+ const useClipboard: typeof import('@vueuse/core')['useClipboard']
137
+ const useCloned: typeof import('@vueuse/core')['useCloned']
138
+ const useColorMode: typeof import('@vueuse/core')['useColorMode']
139
+ const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
140
+ const useCounter: typeof import('@vueuse/core')['useCounter']
141
+ const useCssModule: typeof import('vue')['useCssModule']
142
+ const useCssVar: typeof import('@vueuse/core')['useCssVar']
143
+ const useCssVars: typeof import('vue')['useCssVars']
144
+ const useCurrentElement: typeof import('@vueuse/core')['useCurrentElement']
145
+ const useCycleList: typeof import('@vueuse/core')['useCycleList']
146
+ const useDark: typeof import('@vueuse/core')['useDark']
147
+ const useDateFormat: typeof import('@vueuse/core')['useDateFormat']
148
+ const useDebounce: typeof import('@vueuse/core')['useDebounce']
149
+ const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn']
150
+ const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory']
151
+ const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion']
152
+ const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation']
153
+ const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio']
154
+ const useDevicesList: typeof import('@vueuse/core')['useDevicesList']
155
+ const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
156
+ const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
157
+ const useDraggable: typeof import('@vueuse/core')['useDraggable']
158
+ const useDropZone: typeof import('@vueuse/core')['useDropZone']
159
+ const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
160
+ const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
161
+ const useElementHover: typeof import('@vueuse/core')['useElementHover']
162
+ const useElementSize: typeof import('@vueuse/core')['useElementSize']
163
+ const useElementVisibility: typeof import('@vueuse/core')['useElementVisibility']
164
+ const useEventBus: typeof import('@vueuse/core')['useEventBus']
165
+ const useEventListener: typeof import('@vueuse/core')['useEventListener']
166
+ const useEventSource: typeof import('@vueuse/core')['useEventSource']
167
+ const useEyeDropper: typeof import('@vueuse/core')['useEyeDropper']
168
+ const useFavicon: typeof import('@vueuse/core')['useFavicon']
169
+ const useFetch: typeof import('@vueuse/core')['useFetch']
170
+ const useFileDialog: typeof import('@vueuse/core')['useFileDialog']
171
+ const useFileSystemAccess: typeof import('@vueuse/core')['useFileSystemAccess']
172
+ const useFocus: typeof import('@vueuse/core')['useFocus']
173
+ const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin']
174
+ const useFps: typeof import('@vueuse/core')['useFps']
175
+ const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
176
+ const useGamepad: typeof import('@vueuse/core')['useGamepad']
177
+ const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
178
+ const useIdle: typeof import('@vueuse/core')['useIdle']
179
+ const useImage: typeof import('@vueuse/core')['useImage']
180
+ const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
181
+ const useIntersectionObserver: typeof import('@vueuse/core')['useIntersectionObserver']
182
+ const useInterval: typeof import('@vueuse/core')['useInterval']
183
+ const useIntervalFn: typeof import('@vueuse/core')['useIntervalFn']
184
+ const useKeyModifier: typeof import('@vueuse/core')['useKeyModifier']
185
+ const useLastChanged: typeof import('@vueuse/core')['useLastChanged']
186
+ const useLink: typeof import('vue-router')['useLink']
187
+ const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage']
188
+ const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys']
189
+ const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory']
190
+ const useMediaControls: typeof import('@vueuse/core')['useMediaControls']
191
+ const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
192
+ const useMemoize: typeof import('@vueuse/core')['useMemoize']
193
+ const useMemory: typeof import('@vueuse/core')['useMemory']
194
+ const useMounted: typeof import('@vueuse/core')['useMounted']
195
+ const useMouse: typeof import('@vueuse/core')['useMouse']
196
+ const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
197
+ const useMousePressed: typeof import('@vueuse/core')['useMousePressed']
198
+ const useMutationObserver: typeof import('@vueuse/core')['useMutationObserver']
199
+ const useNavigatorLanguage: typeof import('@vueuse/core')['useNavigatorLanguage']
200
+ const useNetwork: typeof import('@vueuse/core')['useNetwork']
201
+ const useNow: typeof import('@vueuse/core')['useNow']
202
+ const useObjectUrl: typeof import('@vueuse/core')['useObjectUrl']
203
+ const useOffsetPagination: typeof import('@vueuse/core')['useOffsetPagination']
204
+ const useOnline: typeof import('@vueuse/core')['useOnline']
205
+ const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
206
+ const useParallax: typeof import('@vueuse/core')['useParallax']
207
+ const usePermission: typeof import('@vueuse/core')['usePermission']
208
+ const usePointer: typeof import('@vueuse/core')['usePointer']
209
+ const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
210
+ const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
211
+ const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast']
212
+ const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
213
+ const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
214
+ const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion']
215
+ const useRafFn: typeof import('@vueuse/core')['useRafFn']
216
+ const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
217
+ const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
218
+ const useRoute: typeof import('vue-router')['useRoute']
219
+ const useRouter: typeof import('vue-router')['useRouter']
220
+ const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation']
221
+ const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea']
222
+ const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
223
+ const useScroll: typeof import('@vueuse/core')['useScroll']
224
+ const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
225
+ const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
226
+ const useShare: typeof import('@vueuse/core')['useShare']
227
+ const useSlots: typeof import('vue')['useSlots']
228
+ const useSorted: typeof import('@vueuse/core')['useSorted']
229
+ const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
230
+ const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis']
231
+ const useStepper: typeof import('@vueuse/core')['useStepper']
232
+ const useStorage: typeof import('@vueuse/core')['useStorage']
233
+ const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync']
234
+ const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
235
+ const useSupported: typeof import('@vueuse/core')['useSupported']
236
+ const useSwipe: typeof import('@vueuse/core')['useSwipe']
237
+ const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
238
+ const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
239
+ const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
240
+ const useTextareaAutosize: typeof import('@vueuse/core')['useTextareaAutosize']
241
+ const useThrottle: typeof import('@vueuse/core')['useThrottle']
242
+ const useThrottleFn: typeof import('@vueuse/core')['useThrottleFn']
243
+ const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
244
+ const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo']
245
+ const useTimeout: typeof import('@vueuse/core')['useTimeout']
246
+ const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn']
247
+ const useTimeoutPoll: typeof import('@vueuse/core')['useTimeoutPoll']
248
+ const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
249
+ const useTitle: typeof import('@vueuse/core')['useTitle']
250
+ const useToNumber: typeof import('@vueuse/core')['useToNumber']
251
+ const useToString: typeof import('@vueuse/core')['useToString']
252
+ const useToggle: typeof import('@vueuse/core')['useToggle']
253
+ const useTransition: typeof import('@vueuse/core')['useTransition']
254
+ const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams']
255
+ const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
256
+ const useVModel: typeof import('@vueuse/core')['useVModel']
257
+ const useVModels: typeof import('@vueuse/core')['useVModels']
258
+ const useVibrate: typeof import('@vueuse/core')['useVibrate']
259
+ const useVirtualList: typeof import('@vueuse/core')['useVirtualList']
260
+ const useWakeLock: typeof import('@vueuse/core')['useWakeLock']
261
+ const useWebNotification: typeof import('@vueuse/core')['useWebNotification']
262
+ const useWebSocket: typeof import('@vueuse/core')['useWebSocket']
263
+ const useWebWorker: typeof import('@vueuse/core')['useWebWorker']
264
+ const useWebWorkerFn: typeof import('@vueuse/core')['useWebWorkerFn']
265
+ const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
266
+ const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
267
+ const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
268
+ const watch: typeof import('vue')['watch']
269
+ const watchArray: typeof import('@vueuse/core')['watchArray']
270
+ const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
271
+ const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
272
+ const watchEffect: typeof import('vue')['watchEffect']
273
+ const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
274
+ const watchOnce: typeof import('@vueuse/core')['watchOnce']
275
+ const watchPausable: typeof import('@vueuse/core')['watchPausable']
276
+ const watchPostEffect: typeof import('vue')['watchPostEffect']
277
+ const watchSyncEffect: typeof import('vue')['watchSyncEffect']
278
+ const watchThrottled: typeof import('@vueuse/core')['watchThrottled']
279
+ const watchTriggerable: typeof import('@vueuse/core')['watchTriggerable']
280
+ const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
281
+ const whenever: typeof import('@vueuse/core')['whenever']
282
+ }
@@ -0,0 +1,9 @@
1
+ <!--
2
+ * @Author: zhangyang
3
+ * @Date: 2022-12-03 16:22:39
4
+ * @LastEditTime: 2022-12-03 16:22:40
5
+ * @Description:
6
+ -->
7
+ <template>
8
+ <RouterView />
9
+ </template>
@@ -0,0 +1,23 @@
1
+ <!--
2
+ * @Author: zhangyang
3
+ * @Date: 2022-10-25 17:32:07
4
+ * @LastEditTime: 2023-01-05 16:54:27
5
+ * @Description:
6
+ -->
7
+ <template>
8
+ <a v-if="linkProps(to) === 'a'" :href="to" target="_blank" rel="noopener">
9
+ <div class="flex items-center">
10
+ <slot />
11
+ </div>
12
+ </a>
13
+ <router-link v-else :to="to">
14
+ <div class="flex items-center">
15
+ <slot />
16
+ </div>
17
+ </router-link>
18
+ </template>
19
+ <script lang="ts" setup>
20
+ import { isHttpUrl } from '@bluesyoung/utils';
21
+ const props = defineProps<{ to: string }>();
22
+ const linkProps = (url: string) => isHttpUrl(url) ? 'a' : 'router-link';
23
+ </script>