xto-fronted 0.4.87 → 0.4.89
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/App.vue.d.ts +2 -0
- package/dist/api/auth.d.ts +8 -0
- package/dist/api/system.d.ts +16 -0
- package/dist/api/user.d.ts +13 -0
- package/dist/components/Layout/Footer.vue.d.ts +2 -0
- package/dist/components/Layout/Header.vue.d.ts +5 -0
- package/dist/components/Layout/MixTopMenu.vue.d.ts +5 -0
- package/dist/components/Layout/Sidebar.vue.d.ts +11 -0
- package/dist/components/Layout/SidebarMenuItem.vue.d.ts +5 -0
- package/dist/components/Layout/Tabs.vue.d.ts +2 -0
- package/dist/components/Layout/TopMenu.vue.d.ts +5 -0
- package/dist/components/Layout/index.vue.d.ts +2 -0
- package/dist/composables/useApp.d.ts +29 -0
- package/dist/composables/useAuth.d.ts +6 -0
- package/dist/composables/useForm.d.ts +20 -0
- package/dist/composables/useI18n.d.ts +30 -0
- package/dist/composables/useTable.d.ts +29 -0
- package/dist/directives/permission.d.ts +4 -0
- package/dist/enums/index.d.ts +32 -0
- package/dist/index-BRvi9qW-.js +515 -0
- package/dist/index-BVGW4DDQ.js +189 -0
- package/dist/index-Bmf0YbVq.js +189 -0
- package/dist/index-C2-a5KSQ.js +4233 -0
- package/dist/index-CeZ0CSSs.js +641 -0
- package/dist/index-D25KzR0I.js +479 -0
- package/dist/index-DEYOivza.js +641 -0
- package/dist/index-DReodgBw.js +4233 -0
- package/dist/index-DjERNRXX.js +515 -0
- package/dist/index-gBlRG4kk.js +479 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.es.js +94 -0
- package/dist/index.umd.js +8 -0
- package/dist/main.d.ts +0 -0
- package/dist/router/dynamicRoutes.d.ts +30 -0
- package/dist/router/guards.d.ts +17 -0
- package/dist/router/index.d.ts +6 -0
- package/dist/router/layoutRoute.d.ts +22 -0
- package/dist/router/staticRoutes.d.ts +2 -0
- package/dist/stores/app.d.ts +93 -0
- package/dist/stores/auth.d.ts +41 -0
- package/dist/stores/index.d.ts +10 -0
- package/dist/stores/locale.d.ts +42 -0
- package/dist/stores/menu.d.ts +77 -0
- package/dist/stores/user.d.ts +92 -0
- package/dist/style.css +1 -0
- package/dist/utils/auth.d.ts +27 -0
- package/dist/utils/config.d.ts +30 -0
- package/dist/utils/permission.d.ts +18 -0
- package/dist/utils/request.d.ts +24 -0
- package/dist/utils/storage.d.ts +24 -0
- package/dist/views/dashboard/index.vue.d.ts +2 -0
- package/dist/views/error/403.vue.d.ts +2 -0
- package/dist/views/error/404.vue.d.ts +2 -0
- 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/package.json +1 -1
- package/src/router/layoutRoute.ts +7 -2
|
@@ -0,0 +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, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
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>;
|
|
@@ -0,0 +1,13 @@
|
|
|
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>;
|
|
@@ -0,0 +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, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
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;
|
|
@@ -0,0 +1,5 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
menuList?: any[];
|
|
3
|
+
showLogo?: boolean;
|
|
4
|
+
showUser?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
menuList: any[];
|
|
8
|
+
showLogo: boolean;
|
|
9
|
+
showUser: boolean;
|
|
10
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
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;
|
|
@@ -0,0 +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, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
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;
|
|
@@ -0,0 +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, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
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 };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 表格组合函数
|
|
3
|
+
*/
|
|
4
|
+
export interface TableOptions<T = any> {
|
|
5
|
+
fetchData: (params: any) => Promise<{
|
|
6
|
+
list: T[];
|
|
7
|
+
total: number;
|
|
8
|
+
}>;
|
|
9
|
+
defaultPageSize?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function useTable<T = any>(options: TableOptions<T>): {
|
|
12
|
+
loading: import('vue').Ref<boolean, boolean>;
|
|
13
|
+
data: any;
|
|
14
|
+
total: import('vue').Ref<number, number>;
|
|
15
|
+
currentPage: import('vue').Ref<number, number>;
|
|
16
|
+
pageSize: import('vue').Ref<number, number>;
|
|
17
|
+
searchParams: Record<string, any>;
|
|
18
|
+
pagination: import('vue').ComputedRef<{
|
|
19
|
+
current: number;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
total: number;
|
|
22
|
+
}>;
|
|
23
|
+
getData: () => Promise<void>;
|
|
24
|
+
handleSearch: () => void;
|
|
25
|
+
handleReset: () => void;
|
|
26
|
+
handlePageChange: (page: number) => void;
|
|
27
|
+
handleSizeChange: (size: number) => void;
|
|
28
|
+
refresh: () => void;
|
|
29
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 枚举常量
|
|
3
|
+
*/
|
|
4
|
+
export declare enum Status {
|
|
5
|
+
ENABLED = 1,
|
|
6
|
+
DISABLED = 0
|
|
7
|
+
}
|
|
8
|
+
export declare enum Gender {
|
|
9
|
+
UNKNOWN = 0,
|
|
10
|
+
MALE = 1,
|
|
11
|
+
FEMALE = 2
|
|
12
|
+
}
|
|
13
|
+
export declare enum MenuType {
|
|
14
|
+
DIRECTORY = 0,
|
|
15
|
+
MENU = 1,
|
|
16
|
+
BUTTON = 2
|
|
17
|
+
}
|
|
18
|
+
export declare const StatusText: Record<Status, string>;
|
|
19
|
+
export declare const GenderText: Record<Gender, string>;
|
|
20
|
+
export declare const MenuTypeText: Record<MenuType, string>;
|
|
21
|
+
export declare const StatusOptions: {
|
|
22
|
+
label: string;
|
|
23
|
+
value: Status;
|
|
24
|
+
}[];
|
|
25
|
+
export declare const GenderOptions: {
|
|
26
|
+
label: string;
|
|
27
|
+
value: Gender;
|
|
28
|
+
}[];
|
|
29
|
+
export declare const MenuTypeOptions: {
|
|
30
|
+
label: string;
|
|
31
|
+
value: MenuType;
|
|
32
|
+
}[];
|