@ditari/bsui 1.0.0 → 1.0.2

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 (158) hide show
  1. package/dist/cjs/components/components.cjs.js +1 -1
  2. package/dist/cjs/components/components.d.ts +2 -1
  3. package/dist/cjs/components/form/grid-form/GridForm.cjs.js +1 -0
  4. package/dist/cjs/components/form/grid-form/GridForm.d.ts +2 -0
  5. package/dist/cjs/components/form/index.cjs.js +1 -1
  6. package/dist/cjs/components/form/index.d.ts +8 -1
  7. package/dist/cjs/components/grid/Grid.cjs.js +1 -0
  8. package/dist/cjs/components/grid/Grid.d.ts +23 -0
  9. package/dist/cjs/components/grid/GridItem.cjs.js +1 -0
  10. package/dist/cjs/components/grid/GridItem.d.ts +2 -0
  11. package/dist/cjs/components/grid/index.cjs.js +1 -0
  12. package/dist/cjs/components/grid/index.d.ts +23 -0
  13. package/dist/cjs/components/index.cjs.js +1 -1
  14. package/dist/cjs/components/layout/Breadcrumb.vue.cjs.js +1 -1
  15. package/dist/cjs/components/layout/List.vue.cjs.js +1 -1
  16. package/dist/cjs/components/layout/Main.vue.cjs.js +1 -1
  17. package/dist/cjs/components/layout/Menu.cjs.js +1 -1
  18. package/dist/cjs/components/layout/NavTabs.vue.cjs.js +1 -1
  19. package/dist/cjs/components/layout/Show.vue.cjs.js +1 -1
  20. package/dist/cjs/components/layout/Show.vue.d.ts +11 -0
  21. package/dist/cjs/components/layout/index.d.ts +11 -25
  22. package/dist/cjs/components/table/Table.vue.cjs.js +1 -1
  23. package/dist/cjs/components/table/Table.vue.d.ts +1 -1
  24. package/dist/cjs/components/table/index.d.ts +1 -1
  25. package/dist/cjs/components/theme/index.cjs.js +1 -0
  26. package/dist/cjs/components/theme/index.d.ts +1 -0
  27. package/dist/cjs/hooks/http/index.cjs.js +1 -0
  28. package/dist/cjs/hooks/http/index.d.ts +29 -0
  29. package/dist/cjs/hooks/index.cjs.js +1 -0
  30. package/dist/cjs/hooks/index.d.ts +2 -0
  31. package/dist/cjs/hooks/route/index.cjs.js +1 -0
  32. package/dist/cjs/hooks/route/index.d.ts +9 -0
  33. package/dist/cjs/store/index.cjs.js +1 -0
  34. package/dist/cjs/store/index.d.ts +7 -7
  35. package/dist/cjs/store/modules/Breadcrumb.cjs.js +1 -1
  36. package/dist/cjs/store/modules/Breadcrumb.d.ts +6 -16
  37. package/dist/cjs/store/modules/DataDictionary.cjs.js +1 -1
  38. package/dist/cjs/store/modules/DataDictionary.d.ts +28 -3
  39. package/dist/cjs/store/modules/KeepAlive.cjs.js +1 -1
  40. package/dist/cjs/store/modules/KeepAlive.d.ts +3 -4
  41. package/dist/cjs/store/modules/Menu.cjs.js +1 -1
  42. package/dist/cjs/store/modules/Menu.d.ts +1 -2
  43. package/dist/cjs/store/modules/NavTab.cjs.js +1 -1
  44. package/dist/cjs/store/modules/NavTab.d.ts +3 -4
  45. package/dist/cjs/store/modules/Settings.cjs.js +1 -1
  46. package/dist/cjs/store/modules/Settings.d.ts +23 -9
  47. package/dist/cjs/store/modules/User.cjs.js +1 -1
  48. package/dist/cjs/store/modules/User.d.ts +1 -2
  49. package/dist/cjs/store/types.cjs.js +1 -1
  50. package/dist/cjs/utils/get.cjs.js +1 -0
  51. package/dist/css/grid/style/index.css +1 -0
  52. package/dist/css/index.css +1 -0
  53. package/dist/css/menu/style/index.css +1 -0
  54. package/dist/esm/components/components.d.ts +2 -1
  55. package/dist/esm/components/components.esm.js +10 -7
  56. package/dist/esm/components/form/grid-form/GridForm.d.ts +2 -0
  57. package/dist/esm/components/form/grid-form/GridForm.esm.js +9 -0
  58. package/dist/esm/components/form/index.d.ts +8 -1
  59. package/dist/esm/components/form/index.esm.js +5 -3
  60. package/dist/esm/components/grid/Grid.d.ts +23 -0
  61. package/dist/esm/components/grid/Grid.esm.js +55 -0
  62. package/dist/esm/components/grid/GridItem.d.ts +2 -0
  63. package/dist/esm/components/grid/GridItem.esm.js +15 -0
  64. package/dist/esm/components/grid/index.d.ts +23 -0
  65. package/dist/esm/components/grid/index.esm.js +8 -0
  66. package/dist/esm/components/index.esm.js +16 -13
  67. package/dist/esm/components/layout/Breadcrumb.vue.esm.js +13 -19
  68. package/dist/esm/components/layout/List.vue.esm.js +29 -35
  69. package/dist/esm/components/layout/Main.vue.esm.js +53 -50
  70. package/dist/esm/components/layout/Menu.esm.js +45 -19
  71. package/dist/esm/components/layout/NavTabs.vue.esm.js +27 -27
  72. package/dist/esm/components/layout/Show.vue.d.ts +11 -0
  73. package/dist/esm/components/layout/Show.vue.esm.js +70 -48
  74. package/dist/esm/components/layout/index.d.ts +11 -25
  75. package/dist/esm/components/table/Table.vue.d.ts +1 -1
  76. package/dist/esm/components/table/Table.vue.esm.js +2 -2
  77. package/dist/esm/components/table/index.d.ts +1 -1
  78. package/dist/esm/components/theme/index.d.ts +1 -0
  79. package/dist/esm/components/theme/index.esm.js +4 -0
  80. package/dist/esm/hooks/http/index.d.ts +29 -0
  81. package/dist/esm/hooks/http/index.esm.js +52 -0
  82. package/dist/esm/hooks/index.d.ts +2 -0
  83. package/dist/esm/hooks/index.esm.js +6 -0
  84. package/dist/esm/hooks/route/index.d.ts +9 -0
  85. package/dist/esm/hooks/route/index.esm.js +42 -0
  86. package/dist/esm/store/index.d.ts +7 -7
  87. package/dist/esm/store/index.esm.js +16 -0
  88. package/dist/esm/store/modules/Breadcrumb.d.ts +6 -16
  89. package/dist/esm/store/modules/Breadcrumb.esm.js +4 -12
  90. package/dist/esm/store/modules/DataDictionary.d.ts +28 -3
  91. package/dist/esm/store/modules/DataDictionary.esm.js +30 -6
  92. package/dist/esm/store/modules/KeepAlive.d.ts +3 -4
  93. package/dist/esm/store/modules/KeepAlive.esm.js +4 -4
  94. package/dist/esm/store/modules/Menu.d.ts +1 -2
  95. package/dist/esm/store/modules/Menu.esm.js +1 -1
  96. package/dist/esm/store/modules/NavTab.d.ts +3 -4
  97. package/dist/esm/store/modules/NavTab.esm.js +2 -2
  98. package/dist/esm/store/modules/Settings.d.ts +23 -9
  99. package/dist/esm/store/modules/Settings.esm.js +81 -6
  100. package/dist/esm/store/modules/User.d.ts +1 -2
  101. package/dist/esm/store/modules/User.esm.js +4 -1
  102. package/dist/esm/store/types.esm.js +4 -4
  103. package/dist/esm/style.css +1 -274
  104. package/dist/esm/utils/get.esm.js +11 -0
  105. package/dist/style/grid/style/index.scss +61 -0
  106. package/dist/style/index.scss +15 -0
  107. package/dist/style/menu/style/index.scss +18 -0
  108. package/dist/style/theme/theme.scss +1 -0
  109. package/dist/style/theme/variable.scss +21 -0
  110. package/package.json +10 -7
  111. package/src/components/components.ts +4 -0
  112. package/src/components/config/Config.vue +8 -0
  113. package/src/components/form/Form.vue +10 -0
  114. package/src/components/form/grid-form/GridForm.jsx +10 -0
  115. package/src/components/form/index.ts +8 -0
  116. package/src/components/form/style/index.less +0 -0
  117. package/src/components/grid/Grid.tsx +73 -0
  118. package/src/components/grid/GridItem.tsx +15 -0
  119. package/src/components/grid/index.md +4 -0
  120. package/src/components/grid/index.ts +7 -0
  121. package/src/components/grid/style/index.scss +61 -0
  122. package/src/components/index.scss +15 -0
  123. package/src/components/index.ts +31 -0
  124. package/src/components/layout/Breadcrumb.vue +119 -0
  125. package/src/components/layout/Header.vue +0 -0
  126. package/src/components/layout/Layout.jsx +24 -0
  127. package/src/components/layout/List.vue +159 -0
  128. package/src/components/layout/Main.vue +187 -0
  129. package/src/components/layout/Menu.jsx +96 -0
  130. package/src/components/layout/NavTabs.vue +192 -0
  131. package/src/components/layout/Show.vue +157 -0
  132. package/src/components/layout/index.ts +19 -0
  133. package/src/components/menu/Menu.jsx +94 -0
  134. package/src/components/menu/style/index.scss +18 -0
  135. package/src/components/select/Select.vue +85 -0
  136. package/src/components/table/Field.vue +49 -0
  137. package/src/components/table/Table.vue +391 -0
  138. package/src/components/table/index.md +1 -0
  139. package/src/components/table/index.ts +5 -0
  140. package/src/components/theme/index.ts +1 -0
  141. package/src/components/theme/theme.scss +1 -0
  142. package/src/components/theme/variable.scss +21 -0
  143. package/src/hooks/http/index.ts +107 -0
  144. package/src/hooks/index.ts +2 -0
  145. package/src/hooks/route/index.ts +84 -0
  146. package/src/store/index.ts +7 -0
  147. package/src/store/modules/Breadcrumb.ts +25 -0
  148. package/src/store/modules/DataDictionary.ts +49 -0
  149. package/src/store/modules/KeepAlive.ts +47 -0
  150. package/src/store/modules/Menu.ts +24 -0
  151. package/src/store/modules/NavTab.ts +81 -0
  152. package/src/store/modules/Settings.ts +120 -0
  153. package/src/store/modules/User.ts +23 -0
  154. package/src/store/types.ts +15 -0
  155. package/src/tsconfig.json +16 -0
  156. package/src/utils/get.ts +15 -0
  157. package/src/utils/index.ts +2 -0
  158. package/src/utils/install.ts +12 -0
@@ -0,0 +1,52 @@
1
+ import { ref as y, computed as i } from "vue";
2
+ import { usePagination as K } from "vue-request";
3
+ import { get as f } from "../../utils/get.esm.js";
4
+ const Q = (r, t = {}) => {
5
+ t.pagination || (t.pagination = {
6
+ currentKey: "page",
7
+ pageSizeKey: "limit",
8
+ totalKey: "data.total"
9
+ });
10
+ const {
11
+ dataKey: u,
12
+ pagination: { currentKey: o, pageSizeKey: l }
13
+ } = t, a = t.params || y({}), {
14
+ total: g,
15
+ pageSize: c,
16
+ current: p,
17
+ loading: s,
18
+ data: m,
19
+ run: n
20
+ } = K(r, {
21
+ manual: !0,
22
+ pagination: t.pagination,
23
+ loadingDelay: 400,
24
+ loadingKeep: 100,
25
+ onSuccess: () => {
26
+ },
27
+ onError: (e, d) => {
28
+ console.log(d, e);
29
+ }
30
+ }), v = i(() => ({
31
+ total: g.value,
32
+ current: p.value,
33
+ pageSize: c.value
34
+ }));
35
+ return {
36
+ data: i(
37
+ () => f(m.value, u || "data", [])
38
+ ),
39
+ pagination: v,
40
+ loading: s,
41
+ run: n,
42
+ onPaginationChange: (e) => {
43
+ a.value[o] = e.page, a.value[l] = e.size, n(a.value || {});
44
+ },
45
+ onQuery: (e) => {
46
+ a.value = { ...a.value, ...e }, a.value[o] = 1, n(a.value || {});
47
+ }
48
+ };
49
+ };
50
+ export {
51
+ Q as useRequestList
52
+ };
@@ -0,0 +1,2 @@
1
+ export { useRequestList } from "./http";
2
+ export { useDitariRoute } from "./route";
@@ -0,0 +1,6 @@
1
+ import { useRequestList as o } from "./http/index.esm.js";
2
+ import { useDitariRoute as s } from "./route/index.esm.js";
3
+ export {
4
+ s as useDitariRoute,
5
+ o as useRequestList
6
+ };
@@ -0,0 +1,9 @@
1
+ import { RouteLocationNormalized, RouteRecordRaw } from "vue-router";
2
+ /**
3
+ * 路由管理
4
+ * @param routes 未打平的路由
5
+ */
6
+ export declare const useDitariRoute: (routes: RouteRecordRaw[]) => {
7
+ flatRoutes: any[];
8
+ setMatched: (to: RouteLocationNormalized, from: RouteLocationNormalized) => void;
9
+ };
@@ -0,0 +1,42 @@
1
+ import { ref as f } from "vue";
2
+ import { createRouterMatcher as u } from "vue-router";
3
+ import { useBreadcrumbStore as v } from "../../store/modules/Breadcrumb.esm.js";
4
+ const y = (a) => {
5
+ const { saveBreadcrumb: s } = v(), e = f(null), t = f([]);
6
+ return e.value = u(a, {}), {
7
+ flatRoutes: i(a, null),
8
+ setMatched: (m, d) => {
9
+ var n;
10
+ try {
11
+ const c = ((n = e.value) == null ? void 0 : n.resolve(m, d).matched) ?? [];
12
+ t.value = c.reduce((h, o) => {
13
+ var l;
14
+ return h.some(
15
+ (p) => p.path === o.path
16
+ ) || h.push({
17
+ path: o.path,
18
+ title: ((l = o.meta) == null ? void 0 : l.title) ?? "未设置标题"
19
+ }), h;
20
+ }, []);
21
+ } catch (c) {
22
+ console.log(c), t.value = [];
23
+ }
24
+ s(t.value);
25
+ }
26
+ };
27
+ };
28
+ function i(a, s) {
29
+ return a.reduce((e, t) => {
30
+ if (t.children && e.push(...i(t.children, t)), t.component) {
31
+ const r = `${s == null ? void 0 : s.path}` + (t.path ? "/" + t.path : "");
32
+ e.push({
33
+ ...t,
34
+ path: r
35
+ });
36
+ }
37
+ return e;
38
+ }, []);
39
+ }
40
+ export {
41
+ y as useDitariRoute
42
+ };
@@ -1,7 +1,7 @@
1
- export { default as useBreadcrumbStore } from "./modules/Breadcrumb";
2
- export { default as useDataDicStore } from "./modules/DataDictionary";
3
- export { default as useKeepAliveStore } from "./modules/KeepAlive";
4
- export { default as useMenuStore } from "./modules/Menu";
5
- export { default as useNavTabsStore } from "./modules/NavTab";
6
- export { default as useSettingsStore } from "./modules/Settings";
7
- export { default as useUserStore } from "./modules/User";
1
+ export { useBreadcrumbStore } from "./modules/Breadcrumb";
2
+ export { useDataDicStore } from "./modules/DataDictionary";
3
+ export { useKeepAliveStore } from "./modules/KeepAlive";
4
+ export { useMenuStore } from "./modules/Menu";
5
+ export { useNavTabsStore } from "./modules/NavTab";
6
+ export { useSettingsStore } from "./modules/Settings";
7
+ export { useUserStore } from "./modules/User";
@@ -0,0 +1,16 @@
1
+ import { useBreadcrumbStore as o } from "./modules/Breadcrumb.esm.js";
2
+ import { useDataDicStore as s } from "./modules/DataDictionary.esm.js";
3
+ import { useKeepAliveStore as m } from "./modules/KeepAlive.esm.js";
4
+ import { useMenuStore as S } from "./modules/Menu.esm.js";
5
+ import { useNavTabsStore as x } from "./modules/NavTab.esm.js";
6
+ import { useSettingsStore as i } from "./modules/Settings.esm.js";
7
+ import { useUserStore as c } from "./modules/User.esm.js";
8
+ export {
9
+ o as useBreadcrumbStore,
10
+ s as useDataDicStore,
11
+ m as useKeepAliveStore,
12
+ S as useMenuStore,
13
+ x as useNavTabsStore,
14
+ i as useSettingsStore,
15
+ c as useUserStore
16
+ };
@@ -1,20 +1,10 @@
1
- declare const _default: import("pinia").StoreDefinition<string, {
2
- breadcrumbs: never[];
3
- }, {
4
- /**
5
- * 获取面包屑数据
6
- * @param state
7
- */
1
+ export interface State {
2
+ breadcrumbs: [];
3
+ }
4
+ export declare const useBreadcrumbStore: import("pinia").StoreDefinition<string, State, {
8
5
  getBreadcrumb: (state: {
9
- breadcrumbs: never[];
10
- } & import("pinia").PiniaCustomStateProperties<{
11
- breadcrumbs: never[];
12
- }>) => never[];
6
+ breadcrumbs: [];
7
+ } & import("pinia").PiniaCustomStateProperties<State>) => [];
13
8
  }, {
14
- /**
15
- * 保存匹配到的面包屑
16
- * @param data 面包屑数据
17
- */
18
9
  saveBreadcrumb(data: any): void;
19
10
  }>;
20
- export default _default;
@@ -1,27 +1,19 @@
1
1
  import { defineStore as e } from "pinia";
2
2
  import { BREADCRUMB_ID as t } from "../types.esm.js";
3
- const m = e(t, {
3
+ const a = e(t, {
4
4
  state: () => ({
5
- // 保存路由匹配信息 用于渲染面包屑
6
5
  breadcrumbs: []
7
6
  }),
8
7
  getters: {
9
- /**
10
- * 获取面包屑数据
11
- * @param state
12
- */
13
8
  getBreadcrumb: (r) => r.breadcrumbs
14
9
  },
15
10
  actions: {
16
- /**
17
- * 保存匹配到的面包屑
18
- * @param data 面包屑数据
19
- */
20
11
  saveBreadcrumb(r) {
21
12
  this.breadcrumbs = r;
22
13
  }
23
- }
14
+ },
15
+ persist: !0
24
16
  });
25
17
  export {
26
- m as default
18
+ a as useBreadcrumbStore
27
19
  };
@@ -1,4 +1,29 @@
1
- declare const _default: import("pinia").StoreDefinition<string, {
1
+ interface State {
2
2
  someState: string;
3
- }, {}, {}>;
4
- export default _default;
3
+ list: any;
4
+ }
5
+ declare const useDataDicStore: import("pinia").StoreDefinition<string, State, {
6
+ /**
7
+ * 根据key获取字典列表
8
+ * @param state
9
+ */
10
+ getDicByKey: (state: {
11
+ someState: string;
12
+ list: any;
13
+ } & import("pinia").PiniaCustomStateProperties<State>) => (key: string) => any;
14
+ /**
15
+ * 根据字典名称和字典的value 获取对应的中文
16
+ * @param state
17
+ */
18
+ getDicTextByValue: (state: {
19
+ someState: string;
20
+ list: any;
21
+ } & import("pinia").PiniaCustomStateProperties<State>) => (key: string, value: string) => any;
22
+ }, {
23
+ /**
24
+ * 保存字典数据
25
+ * @param data 字典数据
26
+ */
27
+ save(data: any): void;
28
+ }>;
29
+ export { useDataDicStore };
@@ -1,9 +1,33 @@
1
- import { defineStore as t } from "pinia";
2
- import { DATA_DICTIONARY_ID as e } from "../types.esm.js";
3
- t(e, {
1
+ import { defineStore as s } from "pinia";
2
+ import { DATA_DICTIONARY_ID as o } from "../types.esm.js";
3
+ const u = s(o, {
4
4
  state: () => ({
5
- someState: "你好 pinia"
5
+ someState: "你好 pinia",
6
+ list: {}
6
7
  }),
7
- getters: {},
8
- actions: {}
8
+ getters: {
9
+ /**
10
+ * 根据key获取字典列表
11
+ * @param state
12
+ */
13
+ getDicByKey: (t) => (e) => t.list[e] || [],
14
+ /**
15
+ * 根据字典名称和字典的value 获取对应的中文
16
+ * @param state
17
+ */
18
+ getDicTextByValue: (t) => (e, i) => (t.list[e] || []).filter((r) => r.value === i).map((r) => r.label).join("")
19
+ },
20
+ actions: {
21
+ /**
22
+ * 保存字典数据
23
+ * @param data 字典数据
24
+ */
25
+ save(t) {
26
+ this.list = t;
27
+ }
28
+ },
29
+ persist: !0
9
30
  });
31
+ export {
32
+ u as useDataDicStore
33
+ };
@@ -1,5 +1,5 @@
1
1
  import { RouteLocationNormalized } from "vue-router";
2
- declare const _default: import("pinia").StoreDefinition<string, {
2
+ export declare const useKeepAliveStore: import("pinia").StoreDefinition<string, {
3
3
  list: string[];
4
4
  }, {
5
5
  get: (state: {
@@ -10,13 +10,12 @@ declare const _default: import("pinia").StoreDefinition<string, {
10
10
  }, {
11
11
  /**
12
12
  * 删除已经缓存的组件
13
- * @param key 组件名称(必须唯一)
13
+ * @param name 组件名称(必须唯一)
14
14
  */
15
15
  deleteKeepAlive(name: string): void;
16
16
  /**
17
17
  * 保存要缓存的组件名称
18
- * @param 组件名称(必须唯一)
18
+ * @param route
19
19
  */
20
20
  save(route: RouteLocationNormalized): void;
21
21
  }>;
22
- export default _default;
@@ -1,6 +1,6 @@
1
1
  import { defineStore as i } from "pinia";
2
2
  import { KEEP_ALIVE_ID as r } from "../types.esm.js";
3
- const a = i(r, {
3
+ const f = i(r, {
4
4
  state: () => ({
5
5
  list: []
6
6
  }),
@@ -10,7 +10,7 @@ const a = i(r, {
10
10
  actions: {
11
11
  /**
12
12
  * 删除已经缓存的组件
13
- * @param key 组件名称(必须唯一)
13
+ * @param name 组件名称(必须唯一)
14
14
  */
15
15
  deleteKeepAlive(e) {
16
16
  this.list.splice(
@@ -20,7 +20,7 @@ const a = i(r, {
20
20
  },
21
21
  /**
22
22
  * 保存要缓存的组件名称
23
- * @param 组件名称(必须唯一)
23
+ * @param route
24
24
  */
25
25
  save(e) {
26
26
  const t = e.name;
@@ -32,5 +32,5 @@ const a = i(r, {
32
32
  persist: !0
33
33
  });
34
34
  export {
35
- a as default
35
+ f as useKeepAliveStore
36
36
  };
@@ -1,4 +1,4 @@
1
- declare const _default: import("pinia").StoreDefinition<string, {
1
+ export declare const useMenuStore: import("pinia").StoreDefinition<string, {
2
2
  list: never[];
3
3
  }, {
4
4
  getMenu: (state: {
@@ -9,4 +9,3 @@ declare const _default: import("pinia").StoreDefinition<string, {
9
9
  }, {
10
10
  save(data: any): void;
11
11
  }>;
12
- export default _default;
@@ -15,5 +15,5 @@ const o = e(r, {
15
15
  persist: !0
16
16
  });
17
17
  export {
18
- o as default
18
+ o as useMenuStore
19
19
  };
@@ -7,7 +7,7 @@ export interface INavTab {
7
7
  meta: RouteMeta | any;
8
8
  name: string;
9
9
  }
10
- declare const _default: import("pinia").StoreDefinition<string, {
10
+ export declare const useNavTabsStore: import("pinia").StoreDefinition<string, {
11
11
  list: INavTab[];
12
12
  activeKey: string;
13
13
  }, {
@@ -17,7 +17,7 @@ declare const _default: import("pinia").StoreDefinition<string, {
17
17
  fullPath: string;
18
18
  query: LocationQuery;
19
19
  params: RouteParams;
20
- meta: any;
20
+ meta: RouteMeta | any;
21
21
  name: string;
22
22
  }[];
23
23
  activeKey: string;
@@ -31,7 +31,7 @@ declare const _default: import("pinia").StoreDefinition<string, {
31
31
  fullPath: string;
32
32
  query: LocationQuery;
33
33
  params: RouteParams;
34
- meta: any;
34
+ meta: RouteMeta | any;
35
35
  name: string;
36
36
  }[];
37
37
  activeKey: string;
@@ -56,4 +56,3 @@ declare const _default: import("pinia").StoreDefinition<string, {
56
56
  */
57
57
  deleteTabs(key: string): void;
58
58
  }>;
59
- export default _default;
@@ -1,6 +1,6 @@
1
1
  import { defineStore as i } from "pinia";
2
2
  import { NAV_TAB_ID as l } from "../types.esm.js";
3
- const h = i(l, {
3
+ const n = i(l, {
4
4
  state: () => ({
5
5
  // 多标签列表
6
6
  list: [],
@@ -52,5 +52,5 @@ const h = i(l, {
52
52
  persist: !0
53
53
  });
54
54
  export {
55
- h as default
55
+ n as useNavTabsStore
56
56
  };
@@ -1,21 +1,32 @@
1
- declare const _default: import("pinia").StoreDefinition<string, {
1
+ export interface State {
2
2
  refresh: boolean;
3
3
  collapsed: boolean;
4
- }, {
4
+ mediaRuleMap: any;
5
+ gridConfig: any;
6
+ gridValue: any;
7
+ }
8
+ export declare const useSettingsStore: import("pinia").StoreDefinition<string, State, {
5
9
  getRefresh: (state: {
6
10
  refresh: boolean;
7
11
  collapsed: boolean;
8
- } & import("pinia").PiniaCustomStateProperties<{
9
- refresh: boolean;
10
- collapsed: boolean;
11
- }>) => boolean;
12
+ mediaRuleMap: any;
13
+ gridConfig: any;
14
+ gridValue: any;
15
+ } & import("pinia").PiniaCustomStateProperties<State>) => boolean;
12
16
  getCollapsed: (state: {
13
17
  refresh: boolean;
14
18
  collapsed: boolean;
15
- } & import("pinia").PiniaCustomStateProperties<{
19
+ mediaRuleMap: any;
20
+ gridConfig: any;
21
+ gridValue: any;
22
+ } & import("pinia").PiniaCustomStateProperties<State>) => boolean;
23
+ getGrid: (state: {
16
24
  refresh: boolean;
17
25
  collapsed: boolean;
18
- }>) => boolean;
26
+ mediaRuleMap: any;
27
+ gridConfig: any;
28
+ gridValue: any;
29
+ } & import("pinia").PiniaCustomStateProperties<State>) => any;
19
30
  }, {
20
31
  /**
21
32
  * 切换刷新
@@ -25,5 +36,8 @@ declare const _default: import("pinia").StoreDefinition<string, {
25
36
  * 切换菜单收缩状态
26
37
  */
27
38
  switchCollapsed(): void;
39
+ /**
40
+ * 网格匹配
41
+ */
42
+ gridMatching(): void;
28
43
  }>;
29
- export default _default;
@@ -1,15 +1,79 @@
1
- import { defineStore as s } from "pinia";
2
- import { SETTINGS_ID as t } from "../types.esm.js";
3
- const o = s(t, {
1
+ import { defineStore as r } from "pinia";
2
+ import { useMediaQuery as s } from "@vueuse/core";
3
+ import { SETTINGS_ID as a } from "../types.esm.js";
4
+ const d = [
5
+ {
6
+ key: "700",
7
+ value: "(max-width: 700px)",
8
+ description: "小于700设备"
9
+ },
10
+ {
11
+ key: "700-960",
12
+ value: "(min-width:700px) and (max-width: 960px)",
13
+ description: "大于700小于960设备"
14
+ },
15
+ {
16
+ key: "960-1200",
17
+ value: "(min-width:960px) and (max-width: 1200px)",
18
+ description: "大于960小于1024设备"
19
+ },
20
+ {
21
+ key: "1200-1680",
22
+ value: "(min-width:1200px) and (max-width: 1680px)",
23
+ description: " 大于1200小于1680设备"
24
+ },
25
+ {
26
+ key: "1680",
27
+ value: "(min-width:1680px)",
28
+ description: " 大于1680设备"
29
+ }
30
+ ], l = [
31
+ {
32
+ key: "700",
33
+ value: "repeat(1, 100%)",
34
+ col: 1,
35
+ description: "显示一列占100%"
36
+ },
37
+ {
38
+ key: "700-960",
39
+ value: "repeat(2, 50%)",
40
+ col: 2,
41
+ description: "显示两列每列占50%宽"
42
+ },
43
+ {
44
+ key: "960-1200",
45
+ value: "repeat(3, 33.33%)",
46
+ col: 3,
47
+ description: "显示三列每列占33.33%宽"
48
+ },
49
+ {
50
+ key: "1200-1680",
51
+ value: "repeat(4, 25%)",
52
+ col: 4,
53
+ description: "显示4列每列占25%宽"
54
+ },
55
+ {
56
+ key: "1680",
57
+ value: "repeat(5, 20%)",
58
+ col: 5,
59
+ description: " 显示5列每列占20%宽"
60
+ }
61
+ ], c = r(a, {
4
62
  state: () => ({
5
63
  // 刷新状态
6
64
  refresh: !1,
7
65
  // 菜单收缩
8
- collapsed: !1
66
+ collapsed: !1,
67
+ // 屏幕设备匹配规则
68
+ mediaRuleMap: d,
69
+ // 网格配置 根据匹配匹配规则
70
+ gridConfig: l,
71
+ gridValue: {}
9
72
  }),
10
73
  getters: {
11
74
  getRefresh: (e) => e.refresh,
12
- getCollapsed: (e) => e.collapsed
75
+ getCollapsed: (e) => e.collapsed,
76
+ getGrid: (e) => e.gridValue
13
77
  },
14
78
  actions: {
15
79
  /**
@@ -23,10 +87,21 @@ const o = s(t, {
23
87
  */
24
88
  switchCollapsed() {
25
89
  this.collapsed = !this.collapsed;
90
+ },
91
+ /**
92
+ * 网格匹配
93
+ */
94
+ gridMatching() {
95
+ const e = this.mediaRuleMap.filter(
96
+ (i) => s(i.value).value
97
+ )[0], t = this.gridConfig.filter(
98
+ (i) => i.key === e.key
99
+ )[0];
100
+ this.gridValue = t;
26
101
  }
27
102
  },
28
103
  persist: !0
29
104
  });
30
105
  export {
31
- o as default
106
+ c as useSettingsStore
32
107
  };
@@ -1,4 +1,4 @@
1
- declare const _default: import("pinia").StoreDefinition<string, {
1
+ export declare const useUserStore: import("pinia").StoreDefinition<string, {
2
2
  token: undefined;
3
3
  }, {
4
4
  getToken: (state: {
@@ -13,4 +13,3 @@ declare const _default: import("pinia").StoreDefinition<string, {
13
13
  */
14
14
  saveToken(token: any): void;
15
15
  }>;
16
- export default _default;
@@ -1,6 +1,6 @@
1
1
  import { defineStore as t } from "pinia";
2
2
  import { USER_ID as o } from "../types.esm.js";
3
- t(o, {
3
+ const s = t(o, {
4
4
  state: () => ({
5
5
  // token
6
6
  token: void 0
@@ -18,3 +18,6 @@ t(o, {
18
18
  }
19
19
  }
20
20
  });
21
+ export {
22
+ s as useUserStore
23
+ };
@@ -1,10 +1,10 @@
1
- const _ = "DTH_BEAUTY_", I = `${_}BREADCRUMB_ID`, D = `${_}DATA_DICTIONARY_ID`, A = `${_}KEEP_ALIVE_ID`, E = `${_}MENU_ID`, T = `${_}NAV_TABS_ID`, o = `${_}SETTINGS_ID`, t = `${_}USER_ID`;
1
+ const I = "DITARI_STORE_", _ = `${I}BREADCRUMB_ID`, D = `${I}DATA_DICTIONARY_ID`, A = `${I}KEEP_ALIVE_ID`, E = `${I}MENU_ID`, T = `${I}NAV_TABS_ID`, R = `${I}SETTINGS_ID`, o = `${I}USER_ID`;
2
2
  export {
3
- I as BREADCRUMB_ID,
3
+ _ as BREADCRUMB_ID,
4
4
  D as DATA_DICTIONARY_ID,
5
5
  A as KEEP_ALIVE_ID,
6
6
  E as MENU_ID,
7
7
  T as NAV_TAB_ID,
8
- o as SETTINGS_ID,
9
- t as USER_ID
8
+ R as SETTINGS_ID,
9
+ o as USER_ID
10
10
  };