xto-fronted 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.development +4 -0
- package/.env.production +4 -0
- package/README.md +94 -196
- package/dist/{components/Layout/TopMenu.vue.d.ts → App.vue.d.ts} +1 -1
- package/dist/api/auth.d.ts +8 -10
- package/dist/api/system.d.ts +11 -12
- package/dist/api/user.d.ts +12 -3
- package/dist/components/Layout/Footer.vue.d.ts +1 -1
- package/dist/components/Layout/Header.vue.d.ts +3 -14
- package/dist/components/Layout/Sidebar.vue.d.ts +1 -1
- package/dist/components/Layout/Tabs.vue.d.ts +1 -1
- package/dist/components/Layout/index.vue.d.ts +1 -1
- package/dist/composables/useAuth.d.ts +4 -19
- package/dist/directives/permission.d.ts +0 -1
- package/dist/index-CWRs4WMN.js +372 -0
- package/dist/index-CpxpXTQX.js +1462 -0
- package/dist/index-Cu3Z2-PY.js +345 -0
- package/dist/index-DPEVEyik.js +475 -0
- package/dist/index-DYnXaqYf.js +142 -0
- package/dist/index.d.ts +12 -25
- package/dist/index.es.js +76 -1521
- package/dist/index.umd.js +1 -20
- package/dist/main.d.ts +0 -1
- package/dist/router/dynamicRoutes.d.ts +33 -17
- package/dist/router/index.d.ts +4 -26
- package/dist/router/layoutRoute.d.ts +18 -0
- package/dist/router/staticRoutes.d.ts +2 -18
- package/dist/setup.d.ts +17 -0
- package/dist/stores/app.d.ts +15 -9
- package/dist/stores/auth.d.ts +48 -62
- package/dist/stores/index.d.ts +3 -1
- package/dist/stores/menu.d.ts +29 -47
- package/dist/stores/user.d.ts +84 -64
- package/dist/style.css +1 -1
- package/dist/utils/auth.d.ts +10 -10
- package/dist/utils/permission.d.ts +10 -1
- package/dist/utils/request.d.ts +7 -23
- package/dist/{components/Layout/Breadcrumb.vue.d.ts → views/dashboard/index.vue.d.ts} +1 -1
- package/dist/{components/Error → views/error}/403.vue.d.ts +1 -1
- package/dist/{components/Error → views/error}/404.vue.d.ts +1 -1
- package/dist/views/login/index.vue.d.ts +4 -0
- package/dist/views/system/menu/index.vue.d.ts +4 -0
- package/dist/views/system/role/index.vue.d.ts +4 -0
- package/dist/views/system/user/index.vue.d.ts +4 -0
- package/dist/vite.svg +9 -9
- package/index.html +13 -0
- package/package.json +27 -31
- package/public/vite.svg +10 -0
- package/src/App.vue +20 -0
- package/src/api/auth.ts +26 -0
- package/src/api/system.ts +65 -0
- package/src/api/user.ts +46 -0
- package/src/assets/styles/_dark.scss +407 -0
- package/src/assets/styles/_reset.scss +126 -0
- package/src/assets/styles/_root.scss +140 -0
- package/src/assets/styles/_transition.scss +119 -0
- package/src/assets/styles/_variables.scss +45 -0
- package/src/assets/styles/index.scss +187 -0
- package/src/components/Layout/Footer.vue +17 -0
- package/src/components/Layout/Header.vue +390 -0
- package/src/components/Layout/Sidebar.vue +297 -0
- package/src/components/Layout/Tabs.vue +134 -0
- package/src/components/Layout/index.vue +62 -0
- package/src/composables/useAuth.ts +45 -0
- package/src/composables/useForm.ts +79 -0
- package/src/composables/useTable.ts +97 -0
- package/src/directives/permission.ts +38 -0
- package/src/enums/index.ts +63 -0
- package/src/env.d.ts +17 -0
- package/src/index.ts +48 -0
- package/src/main.ts +34 -0
- package/src/router/dynamicRoutes.ts +163 -0
- package/src/router/index.ts +81 -0
- package/src/router/layoutRoute.ts +45 -0
- package/src/router/staticRoutes.ts +43 -0
- package/src/setup.ts +54 -0
- package/src/stores/app.ts +163 -0
- package/src/stores/auth.ts +66 -0
- package/src/stores/index.ts +15 -0
- package/src/stores/menu.ts +80 -0
- package/src/stores/user.ts +73 -0
- package/src/style.css +11 -0
- package/src/types/api.d.ts +84 -0
- package/src/types/global.d.ts +45 -0
- package/src/types/router.d.ts +48 -0
- package/src/types/xto.d.ts +149 -0
- package/src/utils/auth.ts +62 -0
- package/src/utils/permission.ts +42 -0
- package/src/utils/request.ts +124 -0
- package/src/utils/storage.ts +63 -0
- package/src/views/dashboard/index.vue +284 -0
- package/src/views/error/403.vue +57 -0
- package/src/views/error/404.vue +57 -0
- package/src/views/login/index.vue +248 -0
- package/src/views/system/menu/index.vue +381 -0
- package/src/views/system/role/index.vue +304 -0
- package/src/views/system/user/index.vue +327 -0
- package/tsconfig.json +26 -0
- package/tsconfig.node.json +11 -0
- package/vite.config.ts +140 -0
- package/dist/api/menu.d.ts +0 -4
- package/dist/components/Login/index.vue.d.ts +0 -25
- package/dist/components/SettingDrawer/index.vue.d.ts +0 -19
- package/dist/composables/index.d.ts +0 -8
- package/dist/composables/useApp.d.ts +0 -65
- package/dist/composables/useMenu.d.ts +0 -34
- package/dist/config/index.d.ts +0 -31
package/.env.development
ADDED
package/.env.production
ADDED
package/README.md
CHANGED
|
@@ -1,197 +1,95 @@
|
|
|
1
|
-
# Xto Demo
|
|
2
|
-
|
|
3
|
-
基于 xto 组件库的后台管理系统脚手架。
|
|
4
|
-
|
|
5
|
-
## 特性
|
|
6
|
-
|
|
7
|
-
- 🚀 Vue 3 + TypeScript + Vite 5
|
|
8
|
-
- 📦 Pinia 状态管理
|
|
9
|
-
- 🛣️ Vue Router 4 动态路由
|
|
10
|
-
- 🎨 xto 组件库
|
|
11
|
-
- 🔐 权限管理(角色、按钮级别)
|
|
12
|
-
- 🌓 亮色/暗色主题切换
|
|
13
|
-
- 📱 响应式布局
|
|
14
|
-
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
#
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<router-view />
|
|
96
|
-
</div>
|
|
97
|
-
</template>
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## 示例项目
|
|
101
|
-
|
|
102
|
-
查看 [example](./example) 目录获取完整的示例项目。
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
# 在根目录安装依赖(包含 example)
|
|
106
|
-
pnpm install
|
|
107
|
-
|
|
108
|
-
# 运行示例项目
|
|
109
|
-
cd example
|
|
110
|
-
pnpm dev
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## 项目结构
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
src/
|
|
117
|
-
├── api/ # API 接口
|
|
118
|
-
├── assets/ # 静态资源
|
|
119
|
-
│ └── styles/ # 全局样式
|
|
120
|
-
├── components/ # 全局组件
|
|
121
|
-
│ └── Layout/ # 布局组件
|
|
122
|
-
├── composables/ # 组合式函数
|
|
123
|
-
├── directives/ # 自定义指令
|
|
124
|
-
├── enums/ # 枚举常量
|
|
125
|
-
├── router/ # 路由配置
|
|
126
|
-
├── stores/ # Pinia 状态
|
|
127
|
-
├── types/ # 类型定义
|
|
128
|
-
├── utils/ # 工具函数
|
|
129
|
-
└── views/ # 页面视图
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
## 开发
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
# 安装依赖
|
|
136
|
-
pnpm install
|
|
137
|
-
|
|
138
|
-
# 启动开发服务器
|
|
139
|
-
pnpm dev
|
|
140
|
-
|
|
141
|
-
# 构建
|
|
142
|
-
pnpm build
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## 推送仓库
|
|
146
|
-
```bash
|
|
147
|
-
pnpm install
|
|
148
|
-
|
|
149
|
-
# 1. 构建(库模式)
|
|
150
|
-
pnpm run build:lib
|
|
151
|
-
|
|
152
|
-
# 2. 登录 npm(首次需要)
|
|
153
|
-
npm login
|
|
154
|
-
|
|
155
|
-
# 3. 发布
|
|
156
|
-
npm publish
|
|
157
|
-
```
|
|
158
|
-
## 功能模块
|
|
159
|
-
|
|
160
|
-
- [x] 登录/登出
|
|
161
|
-
- [x] 动态路由
|
|
162
|
-
- [x] 侧边栏菜单
|
|
163
|
-
- [x] 顶部导航/面包屑
|
|
164
|
-
- [x] 标签页缓存
|
|
165
|
-
- [x] 仪表盘
|
|
166
|
-
- [x] 用户管理 CRUD
|
|
167
|
-
- [x] 角色管理
|
|
168
|
-
- [x] 菜单管理
|
|
169
|
-
- [x] 主题切换
|
|
170
|
-
- [x] 权限控制
|
|
171
|
-
|
|
172
|
-
## Mock 数据
|
|
173
|
-
|
|
174
|
-
项目使用本地 Mock 数据,可直接登录测试:
|
|
175
|
-
|
|
176
|
-
- 用户名:任意
|
|
177
|
-
- 密码:任意
|
|
178
|
-
|
|
179
|
-
## 技术栈
|
|
180
|
-
|
|
181
|
-
| 技术 | 版本 |
|
|
182
|
-
|------|------|
|
|
183
|
-
| Vue | 3.4+ |
|
|
184
|
-
| TypeScript | 5.4+ |
|
|
185
|
-
| Vite | 5.x |
|
|
186
|
-
| Vue Router | 4.x |
|
|
187
|
-
| Pinia | 2.x |
|
|
188
|
-
| Axios | 1.x |
|
|
189
|
-
| xto | npm |
|
|
190
|
-
|
|
191
|
-
## 更新日志
|
|
192
|
-
|
|
193
|
-
查看 [CHANGELOG.md](./CHANGELOG.md) 获取版本更新记录。
|
|
194
|
-
|
|
195
|
-
## License
|
|
196
|
-
|
|
1
|
+
# Xto Demo
|
|
2
|
+
|
|
3
|
+
基于 xto 组件库的后台管理系统脚手架。
|
|
4
|
+
|
|
5
|
+
## 特性
|
|
6
|
+
|
|
7
|
+
- 🚀 Vue 3 + TypeScript + Vite 5
|
|
8
|
+
- 📦 Pinia 状态管理
|
|
9
|
+
- 🛣️ Vue Router 4 动态路由
|
|
10
|
+
- 🎨 xto 组件库
|
|
11
|
+
- 🔐 权限管理(角色、按钮级别)
|
|
12
|
+
- 🌓 亮色/暗色主题切换
|
|
13
|
+
- 📱 响应式布局
|
|
14
|
+
|
|
15
|
+
## 项目结构
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
src/
|
|
19
|
+
├── api/ # API 接口
|
|
20
|
+
├── assets/ # 静态资源
|
|
21
|
+
│ └── styles/ # 全局样式
|
|
22
|
+
├── components/ # 全局组件
|
|
23
|
+
│ └── Layout/ # 布局组件
|
|
24
|
+
├── composables/ # 组合式函数
|
|
25
|
+
├── directives/ # 自定义指令
|
|
26
|
+
├── enums/ # 枚举常量
|
|
27
|
+
├── router/ # 路由配置
|
|
28
|
+
├── stores/ # Pinia 状态
|
|
29
|
+
├── types/ # 类型定义
|
|
30
|
+
├── utils/ # 工具函数
|
|
31
|
+
└── views/ # 页面视图
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 开发
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# 安装依赖
|
|
38
|
+
pnpm install
|
|
39
|
+
|
|
40
|
+
# 启动开发服务器
|
|
41
|
+
pnpm dev
|
|
42
|
+
|
|
43
|
+
# 构建
|
|
44
|
+
pnpm build
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 推送仓库
|
|
48
|
+
```bash
|
|
49
|
+
pnpm install
|
|
50
|
+
|
|
51
|
+
# 1. 构建(库模式)
|
|
52
|
+
pnpm run build:lib
|
|
53
|
+
|
|
54
|
+
# 2. 登录 npm(首次需要)
|
|
55
|
+
npm login
|
|
56
|
+
|
|
57
|
+
# 3. 发布
|
|
58
|
+
npm publish
|
|
59
|
+
```
|
|
60
|
+
## 功能模块
|
|
61
|
+
|
|
62
|
+
- [x] 登录/登出
|
|
63
|
+
- [x] 动态路由
|
|
64
|
+
- [x] 侧边栏菜单
|
|
65
|
+
- [x] 顶部导航/面包屑
|
|
66
|
+
- [x] 标签页缓存
|
|
67
|
+
- [x] 仪表盘
|
|
68
|
+
- [x] 用户管理 CRUD
|
|
69
|
+
- [x] 角色管理
|
|
70
|
+
- [x] 菜单管理
|
|
71
|
+
- [x] 主题切换
|
|
72
|
+
- [x] 权限控制
|
|
73
|
+
|
|
74
|
+
## Mock 数据
|
|
75
|
+
|
|
76
|
+
项目使用本地 Mock 数据,可直接登录测试:
|
|
77
|
+
|
|
78
|
+
- 用户名:任意
|
|
79
|
+
- 密码:任意
|
|
80
|
+
|
|
81
|
+
## 技术栈
|
|
82
|
+
|
|
83
|
+
| 技术 | 版本 |
|
|
84
|
+
|------|------|
|
|
85
|
+
| Vue | 3.4+ |
|
|
86
|
+
| TypeScript | 5.4+ |
|
|
87
|
+
| Vite | 5.x |
|
|
88
|
+
| Vue Router | 4.x |
|
|
89
|
+
| Pinia | 2.x |
|
|
90
|
+
| Axios | 1.x |
|
|
91
|
+
| xto | npm |
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
197
95
|
MIT
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
2
|
export default _default;
|
package/dist/api/auth.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare function logout(): Promise<ApiResponse<null>>;
|
|
10
|
-
export declare function loginByCode(appId: string, code: string): Promise<ApiResponse<LoginResult>>;
|
|
1
|
+
import { LoginParams, LoginResult, UserInfo } from '../types/api';
|
|
2
|
+
export declare function login(data: LoginParams): Promise<LoginResult>;
|
|
3
|
+
export declare function logout(): Promise<unknown>;
|
|
4
|
+
export declare function getUserInfo(): Promise<UserInfo>;
|
|
5
|
+
export declare function refreshToken(refreshToken: string): Promise<{
|
|
6
|
+
token: string;
|
|
7
|
+
expireTime: number;
|
|
8
|
+
}>;
|
package/dist/api/system.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { PageParams, PageResponse } from '../utils/request';
|
|
2
2
|
import { RoleInfo, MenuItem } from '../types/api';
|
|
3
|
-
|
|
4
3
|
export declare function getRoleList(params: PageParams & {
|
|
5
4
|
status?: number;
|
|
6
5
|
keyword?: string;
|
|
7
|
-
}): Promise<
|
|
8
|
-
export declare function getRoleDetail(id: string | number): Promise<
|
|
9
|
-
export declare function createRole(data: Partial<RoleInfo>): Promise<
|
|
10
|
-
export declare function updateRole(id: string | number, data: Partial<RoleInfo>): Promise<
|
|
11
|
-
export declare function deleteRole(id: string | number): Promise<
|
|
12
|
-
export declare function updateRoleStatus(id: string | number, status: number): Promise<
|
|
13
|
-
export declare function getMenuList(): Promise<
|
|
14
|
-
export declare function getMenuTree(): Promise<
|
|
15
|
-
export declare function createMenu(data: Partial<MenuItem>): Promise<
|
|
16
|
-
export declare function updateMenu(id: string | number, data: Partial<MenuItem>): Promise<
|
|
17
|
-
export declare function deleteMenu(id: string | number): Promise<
|
|
6
|
+
}): Promise<PageResponse<RoleInfo>>;
|
|
7
|
+
export declare function getRoleDetail(id: string | number): Promise<RoleInfo>;
|
|
8
|
+
export declare function createRole(data: Partial<RoleInfo>): Promise<RoleInfo>;
|
|
9
|
+
export declare function updateRole(id: string | number, data: Partial<RoleInfo>): Promise<RoleInfo>;
|
|
10
|
+
export declare function deleteRole(id: string | number): Promise<unknown>;
|
|
11
|
+
export declare function updateRoleStatus(id: string | number, status: number): Promise<unknown>;
|
|
12
|
+
export declare function getMenuList(): Promise<MenuItem[]>;
|
|
13
|
+
export declare function getMenuTree(): Promise<MenuItem[]>;
|
|
14
|
+
export declare function createMenu(data: Partial<MenuItem>): Promise<MenuItem>;
|
|
15
|
+
export declare function updateMenu(id: string | number, data: Partial<MenuItem>): Promise<MenuItem>;
|
|
16
|
+
export declare function deleteMenu(id: string | number): Promise<unknown>;
|
package/dist/api/user.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PageParams, PageResponse } from '../utils/request';
|
|
2
2
|
import { UserInfo } from '../types/api';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
export declare function getUserList(params: PageParams & {
|
|
4
|
+
status?: number;
|
|
5
|
+
keyword?: string;
|
|
6
|
+
}): Promise<PageResponse<UserInfo>>;
|
|
7
|
+
export declare function getUserDetail(id: string | number): Promise<UserInfo>;
|
|
8
|
+
export declare function createUser(data: Partial<UserInfo>): Promise<UserInfo>;
|
|
9
|
+
export declare function updateUser(id: string | number, data: Partial<UserInfo>): Promise<UserInfo>;
|
|
10
|
+
export declare function deleteUser(id: string | number): Promise<unknown>;
|
|
11
|
+
export declare function batchDeleteUsers(ids: (string | number)[]): Promise<unknown>;
|
|
12
|
+
export declare function updateUserStatus(id: string | number, status: number): Promise<unknown>;
|
|
13
|
+
export declare function resetPassword(id: string | number): Promise<unknown>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
2
|
export default _default;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<import('vue').
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
showCollapse?: boolean;
|
|
5
|
-
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
+
dropdownRef: HTMLDivElement;
|
|
3
|
+
}, HTMLDivElement>;
|
|
6
4
|
export default _default;
|
|
7
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
9
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
|
-
} : {
|
|
12
|
-
type: import('vue').PropType<T[K]>;
|
|
13
|
-
required: true;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
2
|
export default _default;
|
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* 封装权限检查、按钮权限等逻辑
|
|
2
|
+
* 权限组合函数
|
|
4
3
|
*/
|
|
5
4
|
export declare function useAuth(): {
|
|
6
|
-
isLoggedIn: import('vue').ComputedRef<boolean>;
|
|
7
|
-
userName: import('vue').ComputedRef<string>;
|
|
8
|
-
userInfo: import('vue').ComputedRef<{
|
|
9
|
-
uId: string;
|
|
10
|
-
appId: string;
|
|
11
|
-
userId: string;
|
|
12
|
-
userName: string;
|
|
13
|
-
departmentName?: string | undefined;
|
|
14
|
-
email?: string | undefined;
|
|
15
|
-
mobilePhone?: string | undefined;
|
|
16
|
-
positionName?: string | undefined;
|
|
17
|
-
avatar?: string | undefined;
|
|
18
|
-
workNo?: string | undefined;
|
|
19
|
-
} | null>;
|
|
20
5
|
hasPermission: (permission: string | string[]) => boolean;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
hasRole: (role: string | string[]) => boolean;
|
|
7
|
+
isAdmin: import('vue').ComputedRef<boolean>;
|
|
8
|
+
isLoggedIn: import('vue').ComputedRef<boolean>;
|
|
24
9
|
};
|