xto-fronted 0.1.6 → 0.1.8

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 (86) hide show
  1. package/README.md +23 -0
  2. package/dist/components/Login/index.vue.d.ts +15 -0
  3. package/dist/config/index.d.ts +25 -5
  4. package/dist/index.d.ts +17 -4
  5. package/dist/index.es.js +1272 -55
  6. package/dist/index.umd.js +1 -1
  7. package/dist/router/dynamicRoutes.d.ts +19 -25
  8. package/dist/router/index.d.ts +24 -4
  9. package/dist/router/staticRoutes.d.ts +15 -2
  10. package/dist/stores/menu.d.ts +14 -8
  11. package/dist/style.css +1 -1
  12. package/dist/utils/request.d.ts +8 -0
  13. package/package.json +4 -10
  14. package/.env.development +0 -3
  15. package/.env.production +0 -3
  16. package/dist/403-DM5wfQkM.js +0 -31
  17. package/dist/404-BurAu5LC.js +0 -31
  18. package/dist/index-BNiEld34.js +0 -15
  19. package/dist/index-Be9RiEfo.js +0 -98
  20. package/dist/index-BqRv1bdN.js +0 -1185
  21. package/dist/index-CQLVXvNJ.js +0 -15
  22. package/dist/index-CyiE8n2V.js +0 -15
  23. package/dist/index-xauR1bOL.js +0 -15
  24. package/dist/views/dashboard/index.vue.d.ts +0 -2
  25. package/dist/views/login/index.vue.d.ts +0 -4
  26. package/dist/views/system/menu/index.vue.d.ts +0 -2
  27. package/dist/views/system/role/index.vue.d.ts +0 -2
  28. package/dist/views/system/user/index.vue.d.ts +0 -2
  29. package/index.html +0 -13
  30. package/public/vite.svg +0 -10
  31. package/src/App.vue +0 -20
  32. package/src/api/auth.ts +0 -35
  33. package/src/api/menu.ts +0 -13
  34. package/src/api/system.ts +0 -65
  35. package/src/api/user.ts +0 -12
  36. package/src/assets/styles/_dark.scss +0 -407
  37. package/src/assets/styles/_reset.scss +0 -126
  38. package/src/assets/styles/_root.scss +0 -140
  39. package/src/assets/styles/_transition.scss +0 -119
  40. package/src/assets/styles/_variables.scss +0 -45
  41. package/src/assets/styles/index.scss +0 -187
  42. package/src/components/Layout/Footer.vue +0 -17
  43. package/src/components/Layout/Header.vue +0 -335
  44. package/src/components/Layout/Sidebar.vue +0 -213
  45. package/src/components/Layout/Tabs.vue +0 -20
  46. package/src/components/Layout/index.vue +0 -62
  47. package/src/composables/index.ts +0 -9
  48. package/src/composables/useApp.ts +0 -170
  49. package/src/composables/useAuth.ts +0 -70
  50. package/src/composables/useForm.ts +0 -79
  51. package/src/composables/useMenu.ts +0 -141
  52. package/src/composables/useTable.ts +0 -97
  53. package/src/config/index.ts +0 -19
  54. package/src/directives/permission.ts +0 -41
  55. package/src/enums/index.ts +0 -63
  56. package/src/env.d.ts +0 -17
  57. package/src/index.ts +0 -44
  58. package/src/main.ts +0 -29
  59. package/src/router/dynamicRoutes.ts +0 -163
  60. package/src/router/index.ts +0 -71
  61. package/src/router/staticRoutes.ts +0 -43
  62. package/src/stores/app.ts +0 -145
  63. package/src/stores/auth.ts +0 -45
  64. package/src/stores/index.ts +0 -15
  65. package/src/stores/menu.ts +0 -158
  66. package/src/stores/user.ts +0 -41
  67. package/src/types/api.d.ts +0 -103
  68. package/src/types/global.d.ts +0 -45
  69. package/src/types/router.d.ts +0 -48
  70. package/src/types/xto.d.ts +0 -149
  71. package/src/utils/auth.ts +0 -86
  72. package/src/utils/permission.ts +0 -30
  73. package/src/utils/request.ts +0 -126
  74. package/src/utils/storage.ts +0 -72
  75. package/src/views/dashboard/index.vue +0 -32
  76. package/src/views/error/403.vue +0 -57
  77. package/src/views/error/404.vue +0 -57
  78. package/src/views/login/index.vue +0 -141
  79. package/src/views/system/menu/index.vue +0 -32
  80. package/src/views/system/role/index.vue +0 -32
  81. package/src/views/system/user/index.vue +0 -32
  82. package/tsconfig.json +0 -26
  83. package/tsconfig.node.json +0 -11
  84. package/vite.config.ts +0 -139
  85. /package/dist/{views/error → components/Error}/403.vue.d.ts +0 -0
  86. /package/dist/{views/error → components/Error}/404.vue.d.ts +0 -0
package/README.md CHANGED
@@ -90,6 +90,29 @@ npm publish
90
90
  | Axios | 1.x |
91
91
  | xto | npm |
92
92
 
93
+ ## 版本记录
94
+
95
+ ### v0.1.7 (2026-03-24)
96
+ - 添加 `@xto/core` 依赖,修复依赖缺失问题
97
+
98
+ ### v0.1.6 (2026-03-24)
99
+ - 移除 `@xto/data`、`@xto/layout`、`@xto/business` 依赖
100
+ - 简化依赖结构,仅保留必要的组件库
101
+
102
+ ### v0.1.5 (2026-03-24)
103
+ - 移除 CLI bin 配置
104
+
105
+ ### v0.1.4 (2026-03-24)
106
+ - 调整 CLI 配置
107
+
108
+ ### v0.1.3 (2026-03-24)
109
+ - 尝试添加 CLI 功能
110
+
111
+ ### v0.1.2 (2026-03-24)
112
+ - 初始发布
113
+ - 封装登录、退出、菜单渲染等统一逻辑
114
+ - 集成 @xto 组件库
115
+
93
116
  ## License
94
117
 
95
118
  MIT
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ logo?: string;
3
+ title?: string;
4
+ subtitle?: string;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
7
+ error: (error: any) => any;
8
+ success: (data: any) => any;
9
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onError?: ((error: any) => any) | undefined;
11
+ onSuccess?: ((data: any) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
13
+ formRef: any;
14
+ }, HTMLDivElement>;
15
+ export default _default;
@@ -1,11 +1,31 @@
1
1
  /**
2
- * 应用配置
2
+ * XTO Fronted 配置
3
3
  */
4
- export interface AppConfig {
5
- webTitle: string;
4
+ export interface XtoConfig {
5
+ /** 应用名称 */
6
+ appName: string;
7
+ /** API 基础地址 */
6
8
  baseUrl: string;
9
+ /** 应用 ID */
7
10
  appId: string;
11
+ /** 客户端 ID */
8
12
  clientId: string;
13
+ /** 默认首页路径 */
14
+ indexPath?: string;
15
+ /** 登录路径 */
16
+ loginPath?: string;
9
17
  }
10
- declare const config: AppConfig;
11
- export default config;
18
+ declare let _config: XtoConfig;
19
+ /**
20
+ * 设置配置
21
+ */
22
+ export declare function setConfig(config: Partial<XtoConfig>): void;
23
+ /**
24
+ * 获取配置
25
+ */
26
+ export declare function getConfig(): XtoConfig;
27
+ /**
28
+ * 获取单个配置项
29
+ */
30
+ export declare function getConfigValue<K extends keyof XtoConfig>(key: K): XtoConfig[K];
31
+ export default _config;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,12 @@
1
+ import { XtoConfig, setConfig, getConfig, getConfigValue } from './config';
1
2
  export { default as Layout } from './components/Layout/index.vue';
2
3
  export { default as Header } from './components/Layout/Header.vue';
3
4
  export { default as Sidebar } from './components/Layout/Sidebar.vue';
4
5
  export { default as Tabs } from './components/Layout/Tabs.vue';
5
6
  export { default as Footer } from './components/Layout/Footer.vue';
7
+ export { default as Login } from './components/Login/index.vue';
8
+ export { default as NotFound } from './components/Error/404.vue';
9
+ export { default as Forbidden } from './components/Error/403.vue';
6
10
  export { useApp } from './composables/useApp';
7
11
  export { useAuth } from './composables/useAuth';
8
12
  export { useMenu } from './composables/useMenu';
@@ -16,12 +20,21 @@ export * from './stores/app';
16
20
  export * from './stores/auth';
17
21
  export * from './stores/menu';
18
22
  export * from './stores/user';
19
- export { default as router, resetRouter } from './router';
20
- export * from './router/staticRoutes';
21
- export * from './router/dynamicRoutes';
23
+ export { createRouter, resetRouter, createStaticRoutes } from './router';
24
+ export { createLayoutRoute } from './router/dynamicRoutes';
25
+ export { createErrorRoutes } from './router/staticRoutes';
26
+ export type { RouteRecordRaw } from 'vue-router';
22
27
  export * from './api/auth';
23
28
  export * from './api/menu';
24
29
  export * from './api/user';
25
- export { default as appConfig } from './config';
30
+ export { setConfig, getConfig, getConfigValue };
31
+ export type { XtoConfig };
26
32
  export * from './enums';
27
33
  export { default as permissionDirective } from './directives/permission';
34
+ /**
35
+ * 初始化 XTO Fronted
36
+ * @param config 应用配置
37
+ */
38
+ export declare function createXtoApp(config: Partial<XtoConfig>): {
39
+ config: XtoConfig;
40
+ };