@dt-frames/ui 2.0.6 → 2.0.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 (33) hide show
  1. package/es/components/curd/index.js +42 -67
  2. package/es/components/curd/src/components/Curd.d.ts +2 -8
  3. package/es/components/curd/src/hooks/useCurd.d.ts +3 -3
  4. package/es/components/curd/src/props.d.ts +1 -4
  5. package/es/components/curd/src/types/curd.type.d.ts +3 -9
  6. package/es/components/form/index.d.ts +30 -54
  7. package/es/components/form/index.js +74 -41
  8. package/es/components/form/index.less +1 -0
  9. package/es/components/form/src/components/FormButtons.d.ts +3 -3
  10. package/es/components/form/src/components/FormItem.d.ts +5 -8
  11. package/es/components/form/src/components/formIcon.d.ts +4 -4
  12. package/es/components/form/src/components/formInputUseDialog.d.ts +3 -3
  13. package/es/components/form/src/hooks/useFormEvent.d.ts +1 -1
  14. package/es/components/form/src/index.d.ts +24 -42
  15. package/es/components/form/src/props.d.ts +5 -8
  16. package/es/components/modal/index.js +3 -6
  17. package/es/components/modal/src/components/ModalFooter.d.ts +3 -3
  18. package/es/components/modal/src/index.d.ts +9 -9
  19. package/es/components/source/hooks/useSource.d.ts +14 -13
  20. package/es/components/source/index.js +62 -36
  21. package/es/components/table/index.js +151 -158
  22. package/es/components/table/src/index.d.ts +18 -54
  23. package/es/components/table/src/props.d.ts +6 -18
  24. package/es/components/table/src/types/table.type.d.ts +1 -4
  25. package/es/theme/index.d.ts +2 -2
  26. package/es/theme/index.js +299 -294
  27. package/es/theme/src/components/sider/index.d.ts +2 -1
  28. package/es/theme/src/components/sider/mix-sider.d.ts +2 -1
  29. package/es/theme/src/hooks/useMenu.d.ts +1 -1
  30. package/es/theme/src/index.d.ts +2 -1
  31. package/es/theme/src/types/theme.type.d.ts +0 -1
  32. package/index.js +3 -1
  33. package/package.json +1 -1
@@ -13,7 +13,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
13
13
  default: () => {};
14
14
  };
15
15
  layout: {
16
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
16
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
17
17
  default: string;
18
18
  };
19
19
  labelWidth: {
@@ -57,7 +57,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
57
57
  default: () => {};
58
58
  };
59
59
  size: {
60
- type: import("vue").PropType<"small" | "middle" | "large">;
60
+ type: import("vue").PropType<"middle" | "small" | "large">;
61
61
  default: string;
62
62
  };
63
63
  disabled: {
@@ -100,10 +100,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
100
100
  type: import("vue").PropType<{
101
101
  [key: string]: import("vue").Ref<boolean>;
102
102
  }>;
103
- default: () => {
104
- onSearch: import("vue").Ref<boolean>;
105
- onReset: import("vue").Ref<boolean>;
106
- };
103
+ default: () => {};
107
104
  };
108
105
  onSearch: {
109
106
  type: import("vue").PropType<(params: import("@dt-frames/core").Recordable<any>) => void>;
@@ -145,7 +142,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
145
142
  default: () => {};
146
143
  };
147
144
  layout: {
148
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
145
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
149
146
  default: string;
150
147
  };
151
148
  labelWidth: {
@@ -189,7 +186,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
189
186
  default: () => {};
190
187
  };
191
188
  size: {
192
- type: import("vue").PropType<"small" | "middle" | "large">;
189
+ type: import("vue").PropType<"middle" | "small" | "large">;
193
190
  default: string;
194
191
  };
195
192
  disabled: {
@@ -232,10 +229,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
232
229
  type: import("vue").PropType<{
233
230
  [key: string]: import("vue").Ref<boolean>;
234
231
  }>;
235
- default: () => {
236
- onSearch: import("vue").Ref<boolean>;
237
- onReset: import("vue").Ref<boolean>;
238
- };
232
+ default: () => {};
239
233
  };
240
234
  onSearch: {
241
235
  type: import("vue").PropType<(params: import("@dt-frames/core").Recordable<any>) => void>;
@@ -283,7 +277,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
283
277
  default: () => {};
284
278
  };
285
279
  layout: {
286
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
280
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
287
281
  default: string;
288
282
  };
289
283
  labelWidth: {
@@ -327,7 +321,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
327
321
  default: () => {};
328
322
  };
329
323
  size: {
330
- type: import("vue").PropType<"small" | "middle" | "large">;
324
+ type: import("vue").PropType<"middle" | "small" | "large">;
331
325
  default: string;
332
326
  };
333
327
  disabled: {
@@ -370,10 +364,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
370
364
  type: import("vue").PropType<{
371
365
  [key: string]: import("vue").Ref<boolean>;
372
366
  }>;
373
- default: () => {
374
- onSearch: import("vue").Ref<boolean>;
375
- onReset: import("vue").Ref<boolean>;
376
- };
367
+ default: () => {};
377
368
  };
378
369
  onSearch: {
379
370
  type: import("vue").PropType<(params: import("@dt-frames/core").Recordable<any>) => void>;
@@ -2179,8 +2170,8 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2179
2170
  validator?: (rule: import("ant-design-vue/lib/form").RuleObject, value: any, callback: (error?: string) => void) => void | Promise<void>;
2180
2171
  } | any;
2181
2172
  required?: boolean;
2182
- validator?: (rule: import("ant-design-vue/lib/form").RuleObject, value: any, callback: (error?: string) => void) => void | Promise<void>;
2183
2173
  trigger?: "blur" | "change" | ("blur" | "change")[];
2174
+ validator?: (rule: import("ant-design-vue/lib/form").RuleObject, value: any, callback: (error?: string) => void) => void | Promise<void>;
2184
2175
  transform?: (value: any) => any;
2185
2176
  warningOnly?: boolean;
2186
2177
  message?: (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -2218,7 +2209,6 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2218
2209
  validateTrigger?: string | string[];
2219
2210
  };
2220
2211
  required?: boolean;
2221
- validator?: (rule: import("ant-design-vue/lib/form").RuleObject, value: any, callback: (error?: string) => void) => void | Promise<void>;
2222
2212
  trigger?: "blur" | "change" | ("blur" & ["change", "blur"]) | ("change" & ["change", "blur"]) | (("blur" | "change")[] & "blur") | (("blur" | "change")[] & "change") | {
2223
2213
  [x: number]: "blur" | "change";
2224
2214
  length: 2;
@@ -2290,6 +2280,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2290
2280
  0: "change";
2291
2281
  1: "blur";
2292
2282
  };
2283
+ validator?: (rule: import("ant-design-vue/lib/form").RuleObject, value: any, callback: (error?: string) => void) => void | Promise<void>;
2293
2284
  transform?: (value: any) => any;
2294
2285
  warningOnly?: boolean;
2295
2286
  message?: (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -2394,7 +2385,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2394
2385
  default: () => {};
2395
2386
  };
2396
2387
  layout: {
2397
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
2388
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
2398
2389
  default: string;
2399
2390
  };
2400
2391
  labelWidth: {
@@ -2438,7 +2429,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2438
2429
  default: () => {};
2439
2430
  };
2440
2431
  size: {
2441
- type: import("vue").PropType<"small" | "middle" | "large">;
2432
+ type: import("vue").PropType<"middle" | "small" | "large">;
2442
2433
  default: string;
2443
2434
  };
2444
2435
  disabled: {
@@ -2481,10 +2472,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2481
2472
  type: import("vue").PropType<{
2482
2473
  [key: string]: import("vue").Ref<boolean>;
2483
2474
  }>;
2484
- default: () => {
2485
- onSearch: import("vue").Ref<boolean>;
2486
- onReset: import("vue").Ref<boolean>;
2487
- };
2475
+ default: () => {};
2488
2476
  };
2489
2477
  onSearch: {
2490
2478
  type: import("vue").PropType<(params: import("@dt-frames/core").Recordable<any>) => void>;
@@ -2524,7 +2512,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2524
2512
  default: () => {};
2525
2513
  };
2526
2514
  layout: {
2527
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
2515
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
2528
2516
  default: string;
2529
2517
  };
2530
2518
  labelWidth: {
@@ -2568,7 +2556,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2568
2556
  default: () => {};
2569
2557
  };
2570
2558
  size: {
2571
- type: import("vue").PropType<"small" | "middle" | "large">;
2559
+ type: import("vue").PropType<"middle" | "small" | "large">;
2572
2560
  default: string;
2573
2561
  };
2574
2562
  disabled: {
@@ -2611,10 +2599,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2611
2599
  type: import("vue").PropType<{
2612
2600
  [key: string]: import("vue").Ref<boolean>;
2613
2601
  }>;
2614
- default: () => {
2615
- onSearch: import("vue").Ref<boolean>;
2616
- onReset: import("vue").Ref<boolean>;
2617
- };
2602
+ default: () => {};
2618
2603
  };
2619
2604
  onSearch: {
2620
2605
  type: import("vue").PropType<(params: import("@dt-frames/core").Recordable<any>) => void>;
@@ -2647,7 +2632,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2647
2632
  setFormValues: (values: import("@dt-frames/core").Recordable<any>) => Promise<void>;
2648
2633
  appendFormItems: (schema: import("./src/types/form.type").FormSchema[], prefixName?: string, first?: boolean) => void;
2649
2634
  validate: (nameList: (string | number)[]) => Promise<any>;
2650
- validateFields: (nameList: (string | number)[]) => Promise<any>;
2635
+ validateFields: (nameList: (string | number)[]) => Promise<void>;
2651
2636
  getFormValues: () => import("@dt-frames/core").Recordable<any>;
2652
2637
  formActionMethods: {
2653
2638
  setProps: (formProps: Partial<import("vue").ExtractPropTypes<{
@@ -2664,7 +2649,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2664
2649
  default: () => {};
2665
2650
  };
2666
2651
  layout: {
2667
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
2652
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
2668
2653
  default: string;
2669
2654
  };
2670
2655
  labelWidth: {
@@ -2708,7 +2693,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2708
2693
  default: () => {};
2709
2694
  };
2710
2695
  size: {
2711
- type: import("vue").PropType<"small" | "middle" | "large">;
2696
+ type: import("vue").PropType<"middle" | "small" | "large">;
2712
2697
  default: string;
2713
2698
  };
2714
2699
  disabled: {
@@ -2751,10 +2736,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2751
2736
  type: import("vue").PropType<{
2752
2737
  [key: string]: import("vue").Ref<boolean>;
2753
2738
  }>;
2754
- default: () => {
2755
- onSearch: import("vue").Ref<boolean>;
2756
- onReset: import("vue").Ref<boolean>;
2757
- };
2739
+ default: () => {};
2758
2740
  };
2759
2741
  onSearch: {
2760
2742
  type: import("vue").PropType<(params: import("@dt-frames/core").Recordable<any>) => void>;
@@ -2783,7 +2765,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2783
2765
  setFormValues: (values: import("@dt-frames/core").Recordable<any>) => Promise<void>;
2784
2766
  appendFormItems: (schema: import("./src/types/form.type").FormSchema[], prefixName?: string, first?: boolean) => void;
2785
2767
  validate: (nameList: (string | number)[]) => Promise<any>;
2786
- validateFields: (nameList: (string | number)[]) => Promise<any>;
2768
+ validateFields: (nameList: (string | number)[]) => Promise<void>;
2787
2769
  getFormValues: () => import("@dt-frames/core").Recordable<any>;
2788
2770
  };
2789
2771
  getActionsProps: import("vue").ComputedRef<import("@dt-frames/core").Recordable<any>>;
@@ -2811,7 +2793,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2811
2793
  default: () => {};
2812
2794
  };
2813
2795
  layout: {
2814
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
2796
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
2815
2797
  default: string;
2816
2798
  };
2817
2799
  labelWidth: {
@@ -2855,7 +2837,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2855
2837
  default: () => {};
2856
2838
  };
2857
2839
  size: {
2858
- type: import("vue").PropType<"small" | "middle" | "large">;
2840
+ type: import("vue").PropType<"middle" | "small" | "large">;
2859
2841
  default: string;
2860
2842
  };
2861
2843
  disabled: {
@@ -2898,10 +2880,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2898
2880
  type: import("vue").PropType<{
2899
2881
  [key: string]: import("vue").Ref<boolean>;
2900
2882
  }>;
2901
- default: () => {
2902
- onSearch: import("vue").Ref<boolean>;
2903
- onReset: import("vue").Ref<boolean>;
2904
- };
2883
+ default: () => {};
2905
2884
  };
2906
2885
  onSearch: {
2907
2886
  type: import("vue").PropType<(params: import("@dt-frames/core").Recordable<any>) => void>;
@@ -3042,7 +3021,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
3042
3021
  default: () => {};
3043
3022
  };
3044
3023
  layout: {
3045
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
3024
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
3046
3025
  default: string;
3047
3026
  };
3048
3027
  labelWidth: {
@@ -3086,7 +3065,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
3086
3065
  default: () => {};
3087
3066
  };
3088
3067
  size: {
3089
- type: import("vue").PropType<"small" | "middle" | "large">;
3068
+ type: import("vue").PropType<"middle" | "small" | "large">;
3090
3069
  default: string;
3091
3070
  };
3092
3071
  disabled: {
@@ -3129,10 +3108,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
3129
3108
  type: import("vue").PropType<{
3130
3109
  [key: string]: import("vue").Ref<boolean>;
3131
3110
  }>;
3132
- default: () => {
3133
- onSearch: import("vue").Ref<boolean>;
3134
- onReset: import("vue").Ref<boolean>;
3135
- };
3111
+ default: () => {};
3136
3112
  };
3137
3113
  onSearch: {
3138
3114
  type: import("vue").PropType<(params: import("@dt-frames/core").Recordable<any>) => void>;
@@ -3155,11 +3131,10 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
3155
3131
  }>> & {
3156
3132
  onRegister?: (...args: any[]) => any;
3157
3133
  }, {
3158
- size: "small" | "middle" | "large";
3159
3134
  mode: "search" | "dialog";
3160
3135
  autoFetch: boolean;
3161
3136
  model: {};
3162
- layout: "vertical" | "horizontal" | "inline";
3137
+ layout: "vertical" | "inline" | "horizontal";
3163
3138
  labelWidth: string | number;
3164
3139
  enLabelWidth: string | number;
3165
3140
  labelAlign: "left" | "right";
@@ -3167,6 +3142,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
3167
3142
  wrapperCol: {};
3168
3143
  rowProps: {};
3169
3144
  colProps: {};
3145
+ size: "middle" | "small" | "large";
3170
3146
  disabled: boolean;
3171
3147
  compact: boolean;
3172
3148
  schemas: import("./src/types/form.type").FormSchema[];
@@ -3,7 +3,7 @@ import "ant-design-vue/es/form/style";
3
3
  import "ant-design-vue/es/row/style";
4
4
  import { toRaw, unref, computed, getCurrentInstance, reactive, readonly, watchEffect, nextTick, defineComponent, useAttrs, openBlock, createBlock, mergeProps, isRef, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createElementVNode, createVNode, normalizeProps, guardReactiveProps, createCommentVNode, toRefs, isVNode, ref, watch, resolveDirective, normalizeStyle, withDirectives, normalizeClass, onMounted, withKeys, createSlots, renderSlot } from "vue";
5
5
  import { DtCache, CacheKey, deepMerge, Pages, useGo, useRedo, Language, useAppStore, isNumber, useI18n, isString, isFunction, error, useSlots, isArray, isBoolean, isNull, dispatchResize, isObject, isNullAndUnDef, isEmpty, useTimeoutFn } from "@dt-frames/core";
6
- import { isEqual, omit, cloneDeep, upperFirst, uniqBy, set } from "lodash-es";
6
+ import { cloneDeep, isEqual, omit, upperFirst, uniqBy, set } from "lodash-es";
7
7
  import { Input, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Tooltip, Form, FormItem } from "ant-design-vue";
8
8
  import { defineStore } from "pinia";
9
9
  import "ant-design-vue/es/radio/style";
@@ -89,7 +89,7 @@ const defaultThemeConf = {
89
89
  },
90
90
  routeReuse: {
91
91
  show: true,
92
- cache: true,
92
+ cache: false,
93
93
  canDrag: true,
94
94
  showQuick: true,
95
95
  showRedo: true,
@@ -99,7 +99,7 @@ const defaultThemeConf = {
99
99
  const useThemeStore = defineStore({
100
100
  id: "dt-theme",
101
101
  state: () => ({
102
- themeConf: DtCache.getLocal(CacheKey.THEME) ?? defaultThemeConf,
102
+ themeConf: DtCache.getLocal(CacheKey.THEME) ?? cloneDeep(defaultThemeConf),
103
103
  pageLoading: false,
104
104
  mixSiderHasSubMenu: false
105
105
  }),
@@ -134,14 +134,22 @@ const useThemeStore = defineStore({
134
134
  },
135
135
  setMixSiderIsHasMenu(val) {
136
136
  this.mixSiderHasSubMenu = val;
137
+ },
138
+ resetState() {
139
+ DtCache.removeLocal(CacheKey.THEME);
140
+ this.themeConf = cloneDeep(defaultThemeConf);
137
141
  }
138
142
  }
139
143
  });
144
+ function handleGotoPage(router) {
145
+ const go = useGo(router);
146
+ go(unref(router.currentRoute).path, true);
147
+ }
140
148
  defineStore({
141
149
  id: "route-reuse",
142
150
  state: () => ({
143
151
  cacheTabList: /* @__PURE__ */ new Set(),
144
- tabList: DtCache.getLocal(CacheKey.THEME)?.routeReuse?.cache ? DtCache.getLocal(CacheKey.ROUTE_REUSE) || [] : [],
152
+ tabList: DtCache.getLocal(CacheKey.ROUTE_REUSE) || [],
145
153
  lastDragEndIndex: 0
146
154
  }),
147
155
  getters: {
@@ -177,9 +185,9 @@ defineStore({
177
185
  }
178
186
  this.updateCacheTab();
179
187
  },
180
- closeTab(path, router) {
188
+ closeTab(route, router) {
181
189
  const go = useGo(router);
182
- const index = this.tabList.findIndex((item) => item.path === path);
190
+ const index = this.tabList.findIndex((item) => item.path === route.path);
183
191
  let page;
184
192
  if (index === 0) {
185
193
  if (this.tabList.length !== 1) {
@@ -188,9 +196,9 @@ defineStore({
188
196
  } else {
189
197
  page = this.tabList[index - 1];
190
198
  }
191
- this.bulkCloseTabs([path]);
199
+ this.bulkCloseTabs([route.path]);
192
200
  this.updateCacheTab();
193
- path === router.currentRoute.value.path && go(page.path);
201
+ route.path === router.currentRoute.value.path && go(page.path);
194
202
  },
195
203
  closeAllTab(currentRoute, router) {
196
204
  const go = useGo(router);
@@ -200,8 +208,8 @@ defineStore({
200
208
  this.updateCacheTab();
201
209
  go(route.path);
202
210
  },
203
- closeLeftTabs(path) {
204
- const index = this.tabList.findIndex((item) => item.path === path);
211
+ closeLeftTabs(route, router) {
212
+ const index = this.tabList.findIndex((item) => item.path === route.path);
205
213
  if (index > 0) {
206
214
  const leftTabs = this.tabList.slice(0, index);
207
215
  const pathList = [];
@@ -214,9 +222,10 @@ defineStore({
214
222
  this.bulkCloseTabs(pathList);
215
223
  }
216
224
  this.updateCacheTab();
225
+ handleGotoPage(router);
217
226
  },
218
- closeRightTabs(path) {
219
- const index = this.tabList.findIndex((item) => item.path === path);
227
+ closeRightTabs(route, router) {
228
+ const index = this.tabList.findIndex((item) => item.path === route.path);
220
229
  if (index >= 0 && index < this.tabList.length - 1) {
221
230
  const rightTabs = this.tabList.slice(index + 1, this.tabList.length);
222
231
  const pathList = [];
@@ -229,24 +238,40 @@ defineStore({
229
238
  this.bulkCloseTabs(pathList);
230
239
  }
231
240
  this.updateCacheTab();
241
+ handleGotoPage(router);
232
242
  },
233
- closeOtherTabs(path) {
243
+ closeOtherTabs(route, router) {
234
244
  const pathList = [];
235
245
  for (let item of this.tabList) {
236
246
  const affix = item?.meta?.affix ?? false;
237
- if (item.path !== path && !affix) {
247
+ if (item.path !== route.path && !affix) {
238
248
  pathList.push(item.path);
239
249
  }
240
250
  }
241
251
  this.bulkCloseTabs(pathList);
242
252
  this.updateCacheTab();
253
+ handleGotoPage(router);
254
+ },
255
+ closeTabByKey(path, router) {
256
+ const go = useGo(router);
257
+ const index = this.tabList.findIndex((item) => item.path === path);
258
+ let page;
259
+ if (index === 0) {
260
+ if (this.tabList.length !== 1) {
261
+ page = this.tabList[index + 1];
262
+ }
263
+ } else {
264
+ page = this.tabList[index - 1];
265
+ }
266
+ this.bulkCloseTabs([path]);
267
+ this.updateCacheTab();
268
+ path === router.currentRoute.value.path && go(page.path);
243
269
  },
244
270
  bulkCloseTabs(pathList) {
245
271
  this.tabList = this.tabList.filter((item) => !pathList.includes(item.fullPath));
246
272
  },
247
273
  updateCacheTab() {
248
- const cacheTab = DtCache.getLocal(CacheKey.THEME)?.routeReuse?.cache;
249
- cacheTab && DtCache.setLocal(CacheKey.ROUTE_REUSE, this.tabList);
274
+ DtCache.setLocal(CacheKey.ROUTE_REUSE, this.tabList);
250
275
  const cacheMap = /* @__PURE__ */ new Set();
251
276
  for (const tab of this.tabList) {
252
277
  if (tab.meta?.hideTab) {
@@ -270,42 +295,46 @@ defineStore({
270
295
  this.tabList.splice(oldIndex, 1);
271
296
  this.tabList.splice(newIndex, 0, currentTab);
272
297
  this.lastDragEndIndex = this.lastDragEndIndex + 1;
298
+ },
299
+ resetState() {
300
+ this.tabList = [];
301
+ this.updateCacheTab();
273
302
  }
274
303
  }
275
304
  });
276
305
  function useMenu() {
277
- const { getMenuConf, setThemeConf } = useThemeStore();
278
- const getCollapsedShowTitle = computed(() => getMenuConf.collapsedShowTitle);
279
- const getIsSidebarType = computed(() => getMenuConf.type === MenuType.SIDE);
280
- const getMenuFixed = computed(() => getMenuConf.fixed);
281
- const getShowMenu = computed(() => getMenuConf.show);
306
+ const { setThemeConf } = useThemeStore();
307
+ const getCollapsedShowTitle = computed(() => useThemeStore().getMenuConf.collapsedShowTitle);
308
+ const getIsSidebarType = computed(() => useThemeStore().getMenuConf.type === MenuType.SIDE);
309
+ const getMenuFixed = computed(() => useThemeStore().getMenuConf.fixed);
310
+ const getShowMenu = computed(() => useThemeStore().getMenuConf.show);
282
311
  const getShowSidebar = computed(() => {
283
312
  return unref(getSplit) || unref(getShowMenu) && unref(getMenuMode) !== MenuMode.HORIZONTAL;
284
313
  });
285
- const getMenuHidden = computed(() => getMenuConf.hidden);
286
- const getMenuTheme = computed(() => getMenuConf.theme);
287
- const getTrigger = computed(() => getMenuConf.trigger);
288
- const getCanDrag = computed(() => getMenuConf.canDrag);
314
+ const getMenuHidden = computed(() => useThemeStore().getMenuConf.hidden);
315
+ const getMenuTheme = computed(() => useThemeStore().getMenuConf.theme);
316
+ const getTrigger = computed(() => useThemeStore().getMenuConf.trigger);
317
+ const getCanDrag = computed(() => useThemeStore().getMenuConf.canDrag);
289
318
  const getIsMixMode = computed(() => {
290
319
  return unref(getMenuMode) === MenuMode.INLINE && unref(getMenuType) === MenuType.MIX;
291
320
  });
292
321
  const getIsMixSidebar = computed(() => unref(getMenuType) === MenuType.MIX_SIDEBAR);
293
322
  const getMenuWidth = computed(() => {
294
323
  if (unref(getIsMixMode)) {
295
- return Number(getMenuConf.menuWidth) - 40;
324
+ return Number(useThemeStore().getMenuConf.menuWidth) - 40;
296
325
  } else if (unref(getIsMixSidebar)) {
297
- return Number(getMenuConf.menuWidth) - 10;
326
+ return Number(useThemeStore().getMenuConf.menuWidth) - 10;
298
327
  } else {
299
- return Number(getMenuConf.menuWidth);
328
+ return Number(useThemeStore().getMenuConf.menuWidth);
300
329
  }
301
330
  });
302
- const getMixSideTrigger = computed(() => getMenuConf.mixSideTrigger);
303
- const getLogoWidth = computed(() => unref(getIsMixSidebar) ? "80px" : getMenuConf.menuWidth);
304
- const getMenuType = computed(() => getMenuConf.type);
331
+ const getMixSideTrigger = computed(() => useThemeStore().getMenuConf.mixSideTrigger);
332
+ const getLogoWidth = computed(() => unref(getIsMixSidebar) ? "80px" : useThemeStore().getMenuConf.menuWidth);
333
+ const getMenuType = computed(() => useThemeStore().getMenuConf.type);
305
334
  const getIsTopMenu = computed(() => unref(getMenuType) === MenuType.TOP_MENU);
306
- const getMenuMode = computed(() => getMenuConf.mode);
307
- const getSplit = computed(() => getMenuConf.split);
308
- const getCollapsed = computed(() => getMenuConf.collapsed);
335
+ const getMenuMode = computed(() => useThemeStore().getMenuConf.mode);
336
+ const getSplit = computed(() => useThemeStore().getMenuConf.split);
337
+ const getCollapsed = computed(() => useThemeStore().getMenuConf.collapsed);
309
338
  const getIsHorizontal = computed(() => unref(getMenuMode) === MenuMode.HORIZONTAL);
310
339
  const setThemeStore = (conf = {}) => setThemeConf(conf);
311
340
  const toggleCollapsed = () => setThemeStore({
@@ -313,7 +342,7 @@ function useMenu() {
313
342
  collapsed: !unref(getCollapsed)
314
343
  }
315
344
  });
316
- const getMiniWidthNumber = computed(() => getMenuConf.collapsedShowTitle ? 80 : 48);
345
+ const getMiniWidthNumber = computed(() => useThemeStore().getMenuConf.collapsedShowTitle ? 80 : 48);
317
346
  const getRealWidth = computed(() => {
318
347
  return unref(getCollapsed) ? unref(getMiniWidthNumber) : unref(getMenuWidth);
319
348
  });
@@ -907,9 +936,15 @@ const _sfc_main$2 = {
907
936
  _disabled = disabled(unref(getValues).model);
908
937
  return _disabled;
909
938
  });
939
+ const getSize = () => {
940
+ if (component === "Switch" && unref(getUiSize) === UiSize.LARGE) {
941
+ return "default";
942
+ }
943
+ return unref(getUiSize) === UiSize.MIDDLE ? "default" : unref(getUiSize);
944
+ };
910
945
  const itemProps = {
911
946
  allowClear: _sProps?.allowClear ?? appConf.ui.form.allowClear,
912
- size: unref(getUiSize) === UiSize.MIDDLE ? "default" : unref(getUiSize),
947
+ size: getSize(),
913
948
  ...unref(getComponentProps),
914
949
  disabled: unref(getDisable)
915
950
  };
@@ -1617,10 +1652,7 @@ const BasicProps = {
1617
1652
  loading: {
1618
1653
  type: Object,
1619
1654
  default: () => {
1620
- return {
1621
- onSearch: ref(false),
1622
- onReset: ref(false)
1623
- };
1655
+ return {};
1624
1656
  }
1625
1657
  },
1626
1658
  onSearch: {
@@ -1697,7 +1729,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1697
1729
  formModel[key] = value;
1698
1730
  const { validateTrigger } = unref(getBindValue);
1699
1731
  if (!validateTrigger || validateTrigger === "change") {
1700
- validateFields([key]);
1732
+ validateFields([key]).catch((err) => {
1733
+ });
1701
1734
  }
1702
1735
  }
1703
1736
  function handleEnterPress() {
@@ -37,6 +37,7 @@
37
37
  .ant-btn{
38
38
  display: flex;
39
39
  align-items: center;
40
+ justify-content: center;
40
41
  font-size: 13px;
41
42
  }
42
43
 
@@ -79,10 +79,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
79
79
  "onHandle-method"?: (...args: any[]) => any;
80
80
  }, {
81
81
  mode: "search" | "dialog";
82
- show: boolean;
83
- showAdvancedButton: boolean;
84
82
  minShowColumn: number;
85
- buttonList: ButtonProps[];
83
+ showAdvancedButton: boolean;
84
+ show: boolean;
86
85
  isAdvanced: boolean;
86
+ buttonList: ButtonProps[];
87
87
  }>;
88
88
  export default _sfc_main;
@@ -25,7 +25,7 @@ declare const _sfc_main: {
25
25
  default: () => {};
26
26
  };
27
27
  layout: {
28
- type: PropType<"vertical" | "horizontal" | "inline">;
28
+ type: PropType<"vertical" | "inline" | "horizontal">;
29
29
  default: string;
30
30
  };
31
31
  labelWidth: {
@@ -50,8 +50,8 @@ declare const _sfc_main: {
50
50
  };
51
51
  rowProps: {
52
52
  type: PropType<Partial<import("vue").ExtractPropTypes<{
53
- align: PropType<"middle" | "top" | "bottom" | "stretch">;
54
- justify: PropType<"center" | "start" | "space-around" | "space-between" | "end">;
53
+ align: PropType<"stretch" | "bottom" | "top" | "middle">;
54
+ justify: PropType<"space-around" | "space-between" | "center" | "end" | "start">;
55
55
  prefixCls: StringConstructor;
56
56
  gutter: {
57
57
  type: PropType<import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter]>;
@@ -69,7 +69,7 @@ declare const _sfc_main: {
69
69
  default: () => {};
70
70
  };
71
71
  size: {
72
- type: PropType<"small" | "large" | "middle">;
72
+ type: PropType<"middle" | "small" | "large">;
73
73
  default: string;
74
74
  };
75
75
  disabled: {
@@ -112,10 +112,7 @@ declare const _sfc_main: {
112
112
  type: PropType<{
113
113
  [key: string]: Ref<boolean>;
114
114
  }>;
115
- default: () => {
116
- onSearch: Ref<boolean>;
117
- onReset: Ref<boolean>;
118
- };
115
+ default: () => {};
119
116
  };
120
117
  onSearch: {
121
118
  type: PropType<(params: Recordable<any>) => void>;
@@ -143,7 +143,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
143
143
  'onUpdate:value': import("vue").PropType<(val: string) => void>;
144
144
  valueModifiers: ObjectConstructor;
145
145
  hidden: BooleanConstructor;
146
- }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "value" | "type" | "loading" | "disabled" | "bordered" | "autofocus" | "readonly" | "allowClear" | "lazy" | "hidden">;
146
+ }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "value" | "disabled" | "allowClear" | "loading" | "hidden" | "readonly" | "autofocus" | "lazy" | "bordered">;
147
147
  $attrs: {
148
148
  [x: string]: unknown;
149
149
  };
@@ -457,7 +457,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
457
457
  inputPrefixCls: StringConstructor;
458
458
  enterButton: import("vue-types").VueTypeValidableDef<any>;
459
459
  onSearch: {
460
- type: import("vue").PropType<(value: string, event?: MouseEvent | import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | KeyboardEvent) => void>;
460
+ type: import("vue").PropType<(value: string, event?: import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | MouseEvent | KeyboardEvent) => void>;
461
461
  };
462
462
  id: StringConstructor;
463
463
  prefixCls: StringConstructor;
@@ -529,7 +529,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
529
529
  inputPrefixCls: StringConstructor;
530
530
  enterButton: import("vue-types").VueTypeValidableDef<any>;
531
531
  onSearch: {
532
- type: import("vue").PropType<(value: string, event?: MouseEvent | import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | KeyboardEvent) => void>;
532
+ type: import("vue").PropType<(value: string, event?: import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | MouseEvent | KeyboardEvent) => void>;
533
533
  };
534
534
  id: StringConstructor;
535
535
  prefixCls: StringConstructor;
@@ -1014,7 +1014,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
1014
1014
  onMousedown: {
1015
1015
  type: import("vue").PropType<(event: MouseEvent) => void>;
1016
1016
  };
1017
- }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "loading" | "disabled" | "htmlType" | "ghost" | "block" | "danger">;
1017
+ }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "loading" | "block" | "htmlType" | "ghost" | "danger">;
1018
1018
  $attrs: {
1019
1019
  [x: string]: unknown;
1020
1020
  };