xto-fronted 0.4.110 → 0.4.112
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/dist/assets/404-Cw_4ZCL6.css +1 -0
- package/dist/assets/404-G0TYnM2t.js +1 -0
- package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
- package/dist/assets/index-8nuVIlbv.css +1 -0
- package/dist/assets/index-BRR97dc6.js +1 -0
- package/dist/assets/index-BlRslYYI.css +1 -0
- package/dist/assets/index-Br0rA9ST.js +1 -0
- package/dist/assets/index-BudArKxR.css +1 -0
- package/dist/assets/index-CEwTCJMr.js +1 -0
- package/dist/assets/index-CFhWBbxk.css +1 -0
- package/dist/assets/index-Cm58iTuj.js +1 -0
- package/dist/assets/index-Cno3g_Ca.js +1 -0
- package/dist/assets/index-Cpew6d-v.css +1 -0
- package/dist/assets/index-D1AzIZb6.js +1 -0
- package/dist/assets/index-DCn9x-He.js +2 -0
- package/dist/assets/index-Dk64JJvN.js +1 -0
- package/dist/assets/index-rQHcgyhm.css +1 -0
- package/dist/assets/index-vfvEFrCH.css +1 -0
- package/dist/assets/vendor-CWD9azq9.js +16 -0
- package/dist/assets/vue-vendor-gcK82_Kd.js +29 -0
- package/dist/assets/xto-base-CL2NKZJJ.css +1 -0
- package/dist/assets/xto-base-wYW0Uxvr.js +1 -0
- package/dist/assets/xto-business--V1F5Gwb.css +1 -0
- package/dist/assets/xto-core-DtPNWVUu.js +1 -0
- package/dist/assets/xto-data-2diO2SyB.js +1 -0
- package/dist/assets/xto-data-Bi03KULC.css +1 -0
- package/dist/assets/xto-feedback-BOOXC1Ev.js +1 -0
- package/dist/assets/xto-feedback-Bxx38c3P.css +1 -0
- package/dist/assets/xto-form-BBugNbnQ.js +1 -0
- package/dist/assets/xto-form-Cu6q3VLG.css +1 -0
- package/dist/assets/xto-layout-BDD6sSlM.css +1 -0
- package/dist/assets/xto-navigation-D_LFy9y9.js +1 -0
- package/dist/assets/xto-navigation-XfpyMpEo.css +1 -0
- package/dist/index.html +28 -0
- package/package.json +1 -1
- package/src/components/Layout/Header.vue +1012 -1012
- package/src/directives/permission.ts +36 -36
- package/src/stores/app.ts +179 -179
- package/src/stores/menu.ts +109 -109
- package/src/stores/user.ts +52 -50
- package/src/types/api.d.ts +81 -80
- package/src/utils/config.ts +16 -3
- package/src/utils/permission.ts +39 -39
- package/src/utils/request.ts +1 -1
- package/dist/App.vue.d.ts +0 -2
- package/dist/api/auth.d.ts +0 -8
- package/dist/api/index.d.ts +0 -6
- package/dist/api/index.js +0 -26
- package/dist/api/system.d.ts +0 -16
- package/dist/api/user.d.ts +0 -13
- package/dist/api.d.ts +0 -2
- package/dist/components/Layout/Footer.vue.d.ts +0 -2
- package/dist/components/Layout/Header.vue.d.ts +0 -5
- package/dist/components/Layout/MixTopMenu.vue.d.ts +0 -10
- package/dist/components/Layout/Sidebar.vue.d.ts +0 -13
- package/dist/components/Layout/SidebarMenuItem.vue.d.ts +0 -5
- package/dist/components/Layout/Tabs.vue.d.ts +0 -2
- package/dist/components/Layout/TopMenu.vue.d.ts +0 -10
- package/dist/components/Layout/index.vue.d.ts +0 -7
- package/dist/composables/useApp.d.ts +0 -29
- package/dist/composables/useAuth.d.ts +0 -6
- package/dist/composables/useForm.d.ts +0 -20
- package/dist/composables/useI18n.d.ts +0 -30
- package/dist/composables/useTable.d.ts +0 -29
- package/dist/directives/permission.d.ts +0 -4
- package/dist/enums/index.d.ts +0 -32
- package/dist/index-BMIR-PSJ.js +0 -515
- package/dist/index-C3r5dnEs.js +0 -479
- package/dist/index-CLcJb_H7.js +0 -189
- package/dist/index-Ch8vmOiD.js +0 -641
- package/dist/index-DTWHgS2f.js +0 -3167
- package/dist/index.d.ts +0 -63
- package/dist/index.js +0 -99
- package/dist/main.d.ts +0 -0
- package/dist/router/dynamicRoutes.d.ts +0 -30
- package/dist/router/guards.d.ts +0 -17
- package/dist/router/index.d.ts +0 -6
- package/dist/router/layoutRoute.d.ts +0 -23
- package/dist/router/staticRoutes.d.ts +0 -2
- package/dist/stores/app.d.ts +0 -99
- package/dist/stores/auth.d.ts +0 -41
- package/dist/stores/index.d.ts +0 -10
- package/dist/stores/locale.d.ts +0 -42
- package/dist/stores/menu.d.ts +0 -83
- package/dist/stores/user.d.ts +0 -92
- package/dist/style.css +0 -1
- package/dist/user-CHxvQHYq.js +0 -1182
- package/dist/utils/auth.d.ts +0 -27
- package/dist/utils/config.d.ts +0 -46
- package/dist/utils/permission.d.ts +0 -17
- package/dist/utils/request.d.ts +0 -34
- package/dist/utils/storage.d.ts +0 -24
- package/dist/views/dashboard/index.vue.d.ts +0 -2
- package/dist/views/error/403.vue.d.ts +0 -2
- package/dist/views/error/404.vue.d.ts +0 -2
- package/dist/views/login/index.vue.d.ts +0 -4
- package/dist/views/system/menu/index.vue.d.ts +0 -4
- package/dist/views/system/role/index.vue.d.ts +0 -4
- package/dist/views/system/user/index.vue.d.ts +0 -4
package/src/stores/user.ts
CHANGED
|
@@ -1,51 +1,53 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 用户状态
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { defineStore } from 'pinia'
|
|
6
|
-
import { ref, computed } from 'vue'
|
|
7
|
-
import type { UserInfo } from '@/types/api'
|
|
8
|
-
import { local } from '@/utils/storage'
|
|
9
|
-
|
|
10
|
-
const USER_INFO_KEY = 'user_info'
|
|
11
|
-
|
|
12
|
-
export const useUserStore = defineStore('user', () => {
|
|
13
|
-
// 状态
|
|
14
|
-
const userInfo = ref<UserInfo | null>(local.get<UserInfo>(USER_INFO_KEY))
|
|
15
|
-
|
|
16
|
-
// 计算属性
|
|
17
|
-
const isLoggedIn = computed(() => !!userInfo.value)
|
|
18
|
-
const userId = computed(() => userInfo.value?.userId || '')
|
|
19
|
-
const userName = computed(() => userInfo.value?.userName || '')
|
|
20
|
-
const departmentName = computed(() => userInfo.value?.departmentName || '')
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
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
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 用户状态
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { defineStore } from 'pinia'
|
|
6
|
+
import { ref, computed } from 'vue'
|
|
7
|
+
import type { UserInfo } from '@/types/api'
|
|
8
|
+
import { local } from '@/utils/storage'
|
|
9
|
+
|
|
10
|
+
const USER_INFO_KEY = 'user_info'
|
|
11
|
+
|
|
12
|
+
export const useUserStore = defineStore('user', () => {
|
|
13
|
+
// 状态
|
|
14
|
+
const userInfo = ref<UserInfo | null>(local.get<UserInfo>(USER_INFO_KEY))
|
|
15
|
+
|
|
16
|
+
// 计算属性
|
|
17
|
+
const isLoggedIn = computed(() => !!userInfo.value)
|
|
18
|
+
const userId = computed(() => userInfo.value?.userId || '')
|
|
19
|
+
const userName = computed(() => userInfo.value?.userName || '')
|
|
20
|
+
const departmentName = computed(() => userInfo.value?.departmentName || '')
|
|
21
|
+
const roleName = computed(() => userInfo.value?.roleName || '')
|
|
22
|
+
const email = computed(() => userInfo.value?.email || '')
|
|
23
|
+
const mobilePhone = computed(() => userInfo.value?.mobilePhone || '')
|
|
24
|
+
const positionName = computed(() => userInfo.value?.positionName || '')
|
|
25
|
+
const avatar = computed(() => userInfo.value?.avatar || '')
|
|
26
|
+
|
|
27
|
+
// 设置用户信息
|
|
28
|
+
const setUserInfo = (info: UserInfo) => {
|
|
29
|
+
userInfo.value = info
|
|
30
|
+
local.set(USER_INFO_KEY, info)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// 清除用户信息
|
|
34
|
+
const clearUserInfo = () => {
|
|
35
|
+
userInfo.value = null
|
|
36
|
+
local.remove(USER_INFO_KEY)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
userInfo,
|
|
41
|
+
isLoggedIn,
|
|
42
|
+
userId,
|
|
43
|
+
userName,
|
|
44
|
+
departmentName,
|
|
45
|
+
roleName,
|
|
46
|
+
email,
|
|
47
|
+
mobilePhone,
|
|
48
|
+
positionName,
|
|
49
|
+
avatar,
|
|
50
|
+
setUserInfo,
|
|
51
|
+
clearUserInfo
|
|
52
|
+
}
|
|
51
53
|
})
|
package/src/types/api.d.ts
CHANGED
|
@@ -1,81 +1,82 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* API 通用类型定义
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
// 基础响应
|
|
6
|
-
export interface ApiResponse<T = unknown> {
|
|
7
|
-
code: number
|
|
8
|
-
data: T
|
|
9
|
-
message: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// 分页请求参数
|
|
13
|
-
export interface PageParams {
|
|
14
|
-
page: number
|
|
15
|
-
pageSize: number
|
|
16
|
-
[key: string]: unknown
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// 分页响应
|
|
20
|
-
export interface PageResponse<T> {
|
|
21
|
-
list: T[]
|
|
22
|
-
total: number
|
|
23
|
-
page: number
|
|
24
|
-
pageSize: number
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// 用户信息(参考 tineco-ui)
|
|
28
|
-
export interface UserInfo {
|
|
29
|
-
appId: string
|
|
30
|
-
userId: string
|
|
31
|
-
userName: string
|
|
32
|
-
departmentName?: string
|
|
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
|
-
|
|
1
|
+
/**
|
|
2
|
+
* API 通用类型定义
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// 基础响应
|
|
6
|
+
export interface ApiResponse<T = unknown> {
|
|
7
|
+
code: number
|
|
8
|
+
data: T
|
|
9
|
+
message: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// 分页请求参数
|
|
13
|
+
export interface PageParams {
|
|
14
|
+
page: number
|
|
15
|
+
pageSize: number
|
|
16
|
+
[key: string]: unknown
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 分页响应
|
|
20
|
+
export interface PageResponse<T> {
|
|
21
|
+
list: T[]
|
|
22
|
+
total: number
|
|
23
|
+
page: number
|
|
24
|
+
pageSize: number
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// 用户信息(参考 tineco-ui)
|
|
28
|
+
export interface UserInfo {
|
|
29
|
+
appId: string
|
|
30
|
+
userId: string
|
|
31
|
+
userName: string
|
|
32
|
+
departmentName?: string
|
|
33
|
+
roleName?: string
|
|
34
|
+
email?: string
|
|
35
|
+
mobilePhone?: string
|
|
36
|
+
positionName?: string
|
|
37
|
+
avatar?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// 登录请求参数(参考 tineco-ui)
|
|
41
|
+
export interface LoginParams {
|
|
42
|
+
appId: string
|
|
43
|
+
clientId: string
|
|
44
|
+
uid: string
|
|
45
|
+
password: string
|
|
46
|
+
code?: boolean
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// 登录响应(参考 tineco-ui)
|
|
50
|
+
export interface LoginResult {
|
|
51
|
+
access_token: string
|
|
52
|
+
token_type: string
|
|
53
|
+
refresh_token: string
|
|
54
|
+
expires_time: number
|
|
55
|
+
refresh_time: number
|
|
56
|
+
code?: string
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 菜单项(参考 tineco-ui)
|
|
60
|
+
export interface MenuItem {
|
|
61
|
+
menuCode: string
|
|
62
|
+
menuName: string
|
|
63
|
+
menuUrl: string
|
|
64
|
+
icon?: string
|
|
65
|
+
closable?: boolean
|
|
66
|
+
isDefault?: boolean
|
|
67
|
+
isOut?: boolean
|
|
68
|
+
type?: number // 1 为按钮,其他为菜单
|
|
69
|
+
children?: MenuItem[]
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// 角色信息
|
|
73
|
+
export interface RoleInfo {
|
|
74
|
+
id: number | string
|
|
75
|
+
name: string
|
|
76
|
+
code: string
|
|
77
|
+
description?: string
|
|
78
|
+
status: number
|
|
79
|
+
permissions: string[]
|
|
80
|
+
createTime?: string
|
|
81
|
+
updateTime?: string
|
|
81
82
|
}
|
package/src/utils/config.ts
CHANGED
|
@@ -22,7 +22,12 @@ let runtimeConfig: Record<string, string> = {}
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* 加载运行时配置
|
|
25
|
-
*
|
|
25
|
+
* 仅在生产部署环境加载 config.json,开发环境自动跳过
|
|
26
|
+
*
|
|
27
|
+
* 注意:不能使用 import.meta.env.PROD 判断,因为作为 npm 库构建时
|
|
28
|
+
* Vite 会将 import.meta.env.PROD 静态替换为 true,导致开发环境也会尝试加载
|
|
29
|
+
* 改用 window.location 协议判断:file:// 或 localhost 开发服务器视为开发环境
|
|
30
|
+
*
|
|
26
31
|
* @param basePath 应用基础路径,如 '/admin' 或 '/sea'
|
|
27
32
|
*/
|
|
28
33
|
export async function loadRuntimeConfig(basePath?: string): Promise<Record<string, string>> {
|
|
@@ -31,8 +36,16 @@ export async function loadRuntimeConfig(basePath?: string): Promise<Record<strin
|
|
|
31
36
|
return runtimeConfig
|
|
32
37
|
}
|
|
33
38
|
|
|
34
|
-
//
|
|
35
|
-
|
|
39
|
+
// 判断是否为生产部署环境
|
|
40
|
+
// 开发环境特征:localhost / 127.0.0.1 / 0.0.0.0 / file:// 协议
|
|
41
|
+
const isDevServer = typeof window !== 'undefined' && (
|
|
42
|
+
window.location.hostname === 'localhost' ||
|
|
43
|
+
window.location.hostname === '127.0.0.1' ||
|
|
44
|
+
window.location.hostname === '0.0.0.0' ||
|
|
45
|
+
window.location.protocol === 'file:'
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
if (!isDevServer) {
|
|
36
49
|
try {
|
|
37
50
|
// 确定配置文件路径
|
|
38
51
|
const configPath = basePath ? `${basePath}/config.json` : '/config.json'
|
package/src/utils/permission.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 权限工具函数
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { useMenuStore } from '@/stores/menu'
|
|
6
|
-
import { useUserStore } from '@/stores/user'
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* 检查是否有权限
|
|
10
|
-
* @param permission 权限标识(菜单 code)
|
|
11
|
-
*/
|
|
12
|
-
export function hasPermission(permission: string | string[]): boolean {
|
|
13
|
-
const userStore = useUserStore()
|
|
14
|
-
const menuStore = useMenuStore()
|
|
15
|
-
|
|
16
|
-
// 未登录则无权限
|
|
17
|
-
if (!userStore.isLoggedIn) {
|
|
18
|
-
return false
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// 使用菜单 store 中的权限判断
|
|
22
|
-
return menuStore.hasPermission(permission)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* 检查是否有角色
|
|
27
|
-
* @param _role 角色标识(暂不使用)
|
|
28
|
-
*/
|
|
29
|
-
export function hasRole(_role: string | string[]): boolean {
|
|
30
|
-
const userStore = useUserStore()
|
|
31
|
-
// tineco-ui 不支持 roles 字段,暂时返回已登录状态
|
|
32
|
-
return userStore.isLoggedIn
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* 检查是否是管理员
|
|
37
|
-
*/
|
|
38
|
-
export function isAdmin(): boolean {
|
|
39
|
-
return true // tineco-ui 不支持 roles 字段,暂时返回 true
|
|
1
|
+
/**
|
|
2
|
+
* 权限工具函数
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useMenuStore } from '@/stores/menu'
|
|
6
|
+
import { useUserStore } from '@/stores/user'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 检查是否有权限
|
|
10
|
+
* @param permission 权限标识(菜单 code)
|
|
11
|
+
*/
|
|
12
|
+
export function hasPermission(permission: string | string[]): boolean {
|
|
13
|
+
const userStore = useUserStore()
|
|
14
|
+
const menuStore = useMenuStore()
|
|
15
|
+
|
|
16
|
+
// 未登录则无权限
|
|
17
|
+
if (!userStore.isLoggedIn) {
|
|
18
|
+
return false
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 使用菜单 store 中的权限判断
|
|
22
|
+
return menuStore.hasPermission(permission)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 检查是否有角色
|
|
27
|
+
* @param _role 角色标识(暂不使用)
|
|
28
|
+
*/
|
|
29
|
+
export function hasRole(_role: string | string[]): boolean {
|
|
30
|
+
const userStore = useUserStore()
|
|
31
|
+
// tineco-ui 不支持 roles 字段,暂时返回已登录状态
|
|
32
|
+
return userStore.isLoggedIn
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 检查是否是管理员
|
|
37
|
+
*/
|
|
38
|
+
export function isAdmin(): boolean {
|
|
39
|
+
return true // tineco-ui 不支持 roles 字段,暂时返回 true
|
|
40
40
|
}
|
package/src/utils/request.ts
CHANGED
|
@@ -156,7 +156,7 @@ const createRequest = (): AxiosInstance => {
|
|
|
156
156
|
Message.error('请求资源不存在')
|
|
157
157
|
break
|
|
158
158
|
case 500:
|
|
159
|
-
Message.error('服务器错误')
|
|
159
|
+
Message.error(response.data?.message || '服务器错误')
|
|
160
160
|
break
|
|
161
161
|
default:
|
|
162
162
|
Message.error(response.data?.message || '请求失败')
|
package/dist/App.vue.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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
|
-
export default _default;
|
package/dist/api/auth.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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/index.d.ts
DELETED
package/dist/api/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { b as a, c as t, a as r, d as l, e as o, f as u, g as d, h as g, i as n, j as U, k as i, l as p, m as R, n as c, o as M, p as f, r as h, q as D, u as L, s as b, t as k, v as m, w } from "../user-CHxvQHYq.js";
|
|
2
|
-
export {
|
|
3
|
-
a as batchDeleteUsers,
|
|
4
|
-
t as createMenu,
|
|
5
|
-
r as createRole,
|
|
6
|
-
l as createUser,
|
|
7
|
-
o as deleteMenu,
|
|
8
|
-
u as deleteRole,
|
|
9
|
-
d as deleteUser,
|
|
10
|
-
g as getMenuList,
|
|
11
|
-
n as getMenuTree,
|
|
12
|
-
U as getRoleDetail,
|
|
13
|
-
i as getRoleList,
|
|
14
|
-
p as getUserDetail,
|
|
15
|
-
R as getUserInfo,
|
|
16
|
-
c as getUserList,
|
|
17
|
-
M as login,
|
|
18
|
-
f as logout,
|
|
19
|
-
h as refreshToken,
|
|
20
|
-
D as resetPassword,
|
|
21
|
-
L as updateMenu,
|
|
22
|
-
b as updateRole,
|
|
23
|
-
k as updateRoleStatus,
|
|
24
|
-
m as updateUser,
|
|
25
|
-
w as updateUserStatus
|
|
26
|
-
};
|
package/dist/api/system.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PageParams, PageResponse } from '../utils/request';
|
|
2
|
-
import { RoleInfo, MenuItem } from '../types/api';
|
|
3
|
-
export declare function getRoleList(params: PageParams & {
|
|
4
|
-
status?: number;
|
|
5
|
-
keyword?: string;
|
|
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(appId?: string): 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
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PageParams, PageResponse } from '../utils/request';
|
|
2
|
-
import { UserInfo } from '../types/api';
|
|
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>;
|
package/dist/api.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
searchRef: HTMLDivElement;
|
|
3
|
-
dropdownRef: HTMLDivElement;
|
|
4
|
-
}, HTMLDivElement>;
|
|
5
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
logoSrc?: string;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
-
logoSrc: string;
|
|
6
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
7
|
-
searchRef: HTMLDivElement;
|
|
8
|
-
dropdownRef: HTMLDivElement;
|
|
9
|
-
}, HTMLDivElement>;
|
|
10
|
-
export default _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
menuList?: any[];
|
|
3
|
-
showLogo?: boolean;
|
|
4
|
-
showUser?: boolean;
|
|
5
|
-
logoSrc?: string;
|
|
6
|
-
};
|
|
7
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
8
|
-
menuList: any[];
|
|
9
|
-
showLogo: boolean;
|
|
10
|
-
showUser: boolean;
|
|
11
|
-
logoSrc: string;
|
|
12
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
menu: any;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
logoSrc?: string;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
-
logoSrc: string;
|
|
6
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
7
|
-
searchRef: HTMLDivElement;
|
|
8
|
-
dropdownRef: HTMLDivElement;
|
|
9
|
-
}, HTMLDivElement>;
|
|
10
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
logoSrc?: string;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
-
logoSrc: string;
|
|
6
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
-
export default _default;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 应用组合函数
|
|
3
|
-
* 提供应用级别的状态和方法
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* 应用级别组合函数
|
|
7
|
-
* @returns 应用状态和方法
|
|
8
|
-
*/
|
|
9
|
-
export declare function useApp(): {
|
|
10
|
-
userName: import('vue').ComputedRef<string>;
|
|
11
|
-
userInfo: import('vue').ComputedRef<{
|
|
12
|
-
appId: string;
|
|
13
|
-
userId: string;
|
|
14
|
-
userName: string;
|
|
15
|
-
departmentName?: string | undefined;
|
|
16
|
-
email?: string | undefined;
|
|
17
|
-
mobilePhone?: string | undefined;
|
|
18
|
-
positionName?: string | undefined;
|
|
19
|
-
avatar?: string | undefined;
|
|
20
|
-
} | null>;
|
|
21
|
-
appName: import('vue').ComputedRef<string>;
|
|
22
|
-
isLoggedIn: import('vue').ComputedRef<boolean>;
|
|
23
|
-
isDark: import('vue').ComputedRef<boolean>;
|
|
24
|
-
theme: import('vue').ComputedRef<import('../stores/app').ThemeMode>;
|
|
25
|
-
isCollapsed: import('vue').ComputedRef<boolean>;
|
|
26
|
-
layout: import('vue').ComputedRef<import('../stores/app').LayoutMode>;
|
|
27
|
-
toggleTheme: () => void;
|
|
28
|
-
toggleCollapse: () => void;
|
|
29
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 表单组合函数
|
|
3
|
-
*/
|
|
4
|
-
export interface FormOptions<T = any> {
|
|
5
|
-
rules?: Record<string, any[]>;
|
|
6
|
-
onSubmit?: (data: T) => Promise<void> | void;
|
|
7
|
-
}
|
|
8
|
-
export declare function useForm<T extends Record<string, any> = Record<string, any>>(initialValues: T, options?: FormOptions<T>): {
|
|
9
|
-
formRef: import('vue').Ref<any, any>;
|
|
10
|
-
formData: import('vue').Reactive<T>;
|
|
11
|
-
rules: Record<string, any[]> | undefined;
|
|
12
|
-
loading: import('vue').Ref<boolean, boolean>;
|
|
13
|
-
visible: import('vue').Ref<boolean, boolean>;
|
|
14
|
-
isEdit: import('vue').Ref<boolean, boolean>;
|
|
15
|
-
openAdd: () => void;
|
|
16
|
-
openEdit: (data: Partial<T>) => void;
|
|
17
|
-
close: () => void;
|
|
18
|
-
resetForm: () => void;
|
|
19
|
-
handleSubmit: () => Promise<void>;
|
|
20
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { LocaleCode, LocaleMessages } from '@xto/core/locale';
|
|
2
|
-
/**
|
|
3
|
-
* 使用国际化
|
|
4
|
-
* 封装 locale store,提供更简洁的 API
|
|
5
|
-
*/
|
|
6
|
-
export declare function useI18n(): {
|
|
7
|
-
/** 当前语言代码 */
|
|
8
|
-
locale: LocaleCode;
|
|
9
|
-
/** 当前语言名称 */
|
|
10
|
-
localeName: string;
|
|
11
|
-
/** 支持的语言列表 */
|
|
12
|
-
locales: {
|
|
13
|
-
code: LocaleCode;
|
|
14
|
-
name: string;
|
|
15
|
-
}[];
|
|
16
|
-
/** 翻译函数 */
|
|
17
|
-
t: (key: string, ...args: (string | number)[]) => string;
|
|
18
|
-
/** 当前语言包 */
|
|
19
|
-
messages: LocaleMessages;
|
|
20
|
-
/** 切换语言 */
|
|
21
|
-
setLocale: (code: LocaleCode) => void;
|
|
22
|
-
/** 添加自定义翻译 */
|
|
23
|
-
addMessages: (msgs: LocaleMessages) => void;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* 创建翻译函数
|
|
27
|
-
* 用于在非组件上下文中使用翻译
|
|
28
|
-
*/
|
|
29
|
-
export declare function createTranslator(): (key: string, ...args: (string | number)[]) => string;
|
|
30
|
-
export type { LocaleCode, LocaleMessages };
|