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.
Files changed (59) hide show
  1. package/dist/App.vue.d.ts +2 -0
  2. package/dist/api/auth.d.ts +8 -0
  3. package/dist/api/system.d.ts +16 -0
  4. package/dist/api/user.d.ts +13 -0
  5. package/dist/components/Layout/Footer.vue.d.ts +2 -0
  6. package/dist/components/Layout/Header.vue.d.ts +5 -0
  7. package/dist/components/Layout/MixTopMenu.vue.d.ts +5 -0
  8. package/dist/components/Layout/Sidebar.vue.d.ts +11 -0
  9. package/dist/components/Layout/SidebarMenuItem.vue.d.ts +5 -0
  10. package/dist/components/Layout/Tabs.vue.d.ts +2 -0
  11. package/dist/components/Layout/TopMenu.vue.d.ts +5 -0
  12. package/dist/components/Layout/index.vue.d.ts +2 -0
  13. package/dist/composables/useApp.d.ts +29 -0
  14. package/dist/composables/useAuth.d.ts +6 -0
  15. package/dist/composables/useForm.d.ts +20 -0
  16. package/dist/composables/useI18n.d.ts +30 -0
  17. package/dist/composables/useTable.d.ts +29 -0
  18. package/dist/directives/permission.d.ts +4 -0
  19. package/dist/enums/index.d.ts +32 -0
  20. package/dist/index-BRvi9qW-.js +515 -0
  21. package/dist/index-BVGW4DDQ.js +189 -0
  22. package/dist/index-Bmf0YbVq.js +189 -0
  23. package/dist/index-C2-a5KSQ.js +4233 -0
  24. package/dist/index-CeZ0CSSs.js +641 -0
  25. package/dist/index-D25KzR0I.js +479 -0
  26. package/dist/index-DEYOivza.js +641 -0
  27. package/dist/index-DReodgBw.js +4233 -0
  28. package/dist/index-DjERNRXX.js +515 -0
  29. package/dist/index-gBlRG4kk.js +479 -0
  30. package/dist/index.d.ts +59 -0
  31. package/dist/index.es.js +94 -0
  32. package/dist/index.umd.js +8 -0
  33. package/dist/main.d.ts +0 -0
  34. package/dist/router/dynamicRoutes.d.ts +30 -0
  35. package/dist/router/guards.d.ts +17 -0
  36. package/dist/router/index.d.ts +6 -0
  37. package/dist/router/layoutRoute.d.ts +22 -0
  38. package/dist/router/staticRoutes.d.ts +2 -0
  39. package/dist/stores/app.d.ts +93 -0
  40. package/dist/stores/auth.d.ts +41 -0
  41. package/dist/stores/index.d.ts +10 -0
  42. package/dist/stores/locale.d.ts +42 -0
  43. package/dist/stores/menu.d.ts +77 -0
  44. package/dist/stores/user.d.ts +92 -0
  45. package/dist/style.css +1 -0
  46. package/dist/utils/auth.d.ts +27 -0
  47. package/dist/utils/config.d.ts +30 -0
  48. package/dist/utils/permission.d.ts +18 -0
  49. package/dist/utils/request.d.ts +24 -0
  50. package/dist/utils/storage.d.ts +24 -0
  51. package/dist/views/dashboard/index.vue.d.ts +2 -0
  52. package/dist/views/error/403.vue.d.ts +2 -0
  53. package/dist/views/error/404.vue.d.ts +2 -0
  54. package/dist/views/login/index.vue.d.ts +4 -0
  55. package/dist/views/system/menu/index.vue.d.ts +4 -0
  56. package/dist/views/system/role/index.vue.d.ts +4 -0
  57. package/dist/views/system/user/index.vue.d.ts +4 -0
  58. package/package.json +1 -1
  59. package/src/router/layoutRoute.ts +7 -2
@@ -0,0 +1,24 @@
1
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
+ export interface ApiResponse<T = unknown> {
3
+ code: number;
4
+ data: T;
5
+ message: string;
6
+ }
7
+ export interface PageParams {
8
+ pageNo: number;
9
+ pageSize: number;
10
+ }
11
+ export interface PageResponse<T> {
12
+ records: T[];
13
+ total: number;
14
+ }
15
+ declare const request: AxiosInstance;
16
+ export declare const http: {
17
+ get<T = unknown>(url: string, config?: AxiosRequestConfig): Promise<T>;
18
+ post<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T>;
19
+ put<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T>;
20
+ patch<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T>;
21
+ delete<T = unknown>(url: string, config?: AxiosRequestConfig): Promise<T>;
22
+ download(url: string, config?: AxiosRequestConfig): Promise<Blob>;
23
+ };
24
+ export default request;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * 本地存储封装
3
+ */
4
+ interface StorageWrapper {
5
+ get<T>(key: string): T | null;
6
+ set(key: string, value: unknown): void;
7
+ remove(key: string): void;
8
+ clear(): void;
9
+ }
10
+ export declare const localStorageUtil: StorageWrapper;
11
+ export declare const sessionStorageUtil: StorageWrapper;
12
+ export declare const local: {
13
+ get: <T>(key: string) => T | null;
14
+ set: (key: string, value: unknown) => void;
15
+ remove: (key: string) => void;
16
+ clear: () => void;
17
+ };
18
+ export declare const session: {
19
+ get: <T>(key: string) => T | null;
20
+ set: (key: string, value: unknown) => void;
21
+ remove: (key: string) => void;
22
+ clear: () => void;
23
+ };
24
+ export {};
@@ -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,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,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,4 @@
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
+ formRef: any;
3
+ }, HTMLDivElement>;
4
+ export default _default;
@@ -0,0 +1,4 @@
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
+ formRef: any;
3
+ }, HTMLDivElement>;
4
+ export default _default;
@@ -0,0 +1,4 @@
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
+ formRef: any;
3
+ }, HTMLDivElement>;
4
+ export default _default;
@@ -0,0 +1,4 @@
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
+ formRef: any;
3
+ }, HTMLDivElement>;
4
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xto-fronted",
3
- "version": "0.4.87",
3
+ "version": "0.4.89",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "XTO 前端应用框架",
@@ -10,6 +10,10 @@ interface LayoutRouteOptions {
10
10
  indexPath?: string
11
11
  }
12
12
 
13
+ interface CreateRouterOptions {
14
+ base?: string
15
+ }
16
+
13
17
  /**
14
18
  * 创建布局路由
15
19
  * @param children 子路由配置
@@ -44,11 +48,12 @@ export function createLayoutRoute(
44
48
  /**
45
49
  * 创建路由实例
46
50
  * @param routes 路由配置数组
51
+ * @param options 配置选项
47
52
  * @returns 路由实例
48
53
  */
49
- export function createRouter(routes: RouteRecordRaw[]): Router {
54
+ export function createRouter(routes: RouteRecordRaw[], options: CreateRouterOptions = {}): Router {
50
55
  return vueCreateRouter({
51
- history: createWebHistory(),
56
+ history: createWebHistory(options.base),
52
57
  routes,
53
58
  scrollBehavior: () => ({ left: 0, top: 0 })
54
59
  })