@dt-frames/ui 2.0.3 → 2.0.4

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 (44) hide show
  1. package/es/assets/locales/en.ts +1 -1
  2. package/es/components/curd/index.js +279 -269
  3. package/es/components/drawer/index.d.ts +1 -1
  4. package/es/components/drawer/index.js +27 -27
  5. package/es/components/drawer/src/index.d.ts +2 -3
  6. package/es/components/form/index.d.ts +20 -20
  7. package/es/components/form/index.js +91 -45
  8. package/es/components/form/index.less +206 -8
  9. package/es/components/form/src/components/FormItem.d.ts +3 -7
  10. package/es/components/form/src/components/formIcon.d.ts +14 -14
  11. package/es/components/form/src/components/formInputUseDialog.d.ts +8 -8
  12. package/es/components/form/src/enums/index.d.ts +1 -1
  13. package/es/components/form/src/index.d.ts +16 -16
  14. package/es/components/form/src/props.d.ts +2 -6
  15. package/es/components/form/src/types/form.type.d.ts +1 -1
  16. package/es/components/icons/index.less +5 -0
  17. package/es/components/modal/index.js +35 -34
  18. package/es/components/modal/index.less +10 -0
  19. package/es/components/modal/src/components/ModalFooter.d.ts +3 -3
  20. package/es/components/modal/src/index.d.ts +9 -9
  21. package/es/components/source/hooks/useSource.d.ts +14 -0
  22. package/es/components/source/index.js +66 -28
  23. package/es/components/source/types/source.type.d.ts +4 -8
  24. package/es/components/table/index.js +278 -215
  25. package/es/components/table/index.less +41 -14
  26. package/es/components/table/src/index.d.ts +20 -10
  27. package/es/components/table/src/props.d.ts +8 -4
  28. package/es/components/table/src/types/table.type.d.ts +4 -5
  29. package/es/theme/index.js +342 -120
  30. package/es/theme/index.less +150 -0
  31. package/es/theme/src/components/header/components/size.d.ts +5 -5
  32. package/es/theme/src/components/header/helper/menu-tree.d.ts +1 -0
  33. package/es/theme/src/components/header/index.d.ts +5 -5
  34. package/es/theme/src/components/header/multiple-header.d.ts +6 -7
  35. package/es/theme/src/components/sider/components/drag-bar.d.ts +1 -1
  36. package/es/theme/src/components/sider/components/sider-trigger.d.ts +0 -1
  37. package/es/theme/src/components/sider/index.d.ts +147 -3
  38. package/es/theme/src/components/sider/mix-sider.d.ts +146 -0
  39. package/es/theme/src/enums/theme.enum.d.ts +2 -1
  40. package/es/theme/src/hooks/useMenu.d.ts +5 -3
  41. package/es/theme/src/index.d.ts +159 -15
  42. package/es/theme/src/stores/theme.store.d.ts +3 -0
  43. package/es/theme/src/types/theme.type.d.ts +1 -0
  44. package/package.json +1 -3
@@ -1,14 +1,25 @@
1
- import { toRaw as toRaw$1, unref as unref$1, computed, getCurrentInstance as getCurrentInstance$1, reactive, readonly, watchEffect, nextTick as nextTick$1, defineComponent, useAttrs, openBlock, createBlock, mergeProps, isRef, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createElementVNode, createVNode, normalizeProps, guardReactiveProps, createCommentVNode, toRefs, isVNode, ref as ref$1, watch, resolveDirective, normalizeStyle, withDirectives, normalizeClass, onMounted as onMounted$1, withKeys, createSlots, renderSlot, onUnmounted, inject, h, provide, onBeforeUnmount, resolveDynamicComponent } from "vue";
1
+ 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, onUnmounted, inject, h, provide, onBeforeUnmount, resolveDynamicComponent } from "vue";
2
2
  import { RadioButton, RadioGroup, Button, FormItem as FormItem$1, Col as Col$1, Row, Form as Form$1, Tooltip as Tooltip$1, Spin } from "ant-design-vue/es";
3
3
  import "ant-design-vue/es/form/style";
4
+ import "ant-design-vue/es/row/style";
4
5
  import { DtCache, CacheKey, deepMerge, Pages, useGo, useRedo, Language, useAppStore, isNumber, useI18n, isString, isFunction, error, useSlots, isArray, isBoolean, isNull, dispatchResize, isObject, isNullAndUnDef, isEmpty, useTimeoutFn, useApp, off, on, windowResizeFn, useMessage } from "@dt-frames/core";
5
6
  import { isEqual, omit, cloneDeep, upperFirst, uniqBy, set } from "lodash-es";
6
7
  import { Input, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Tooltip, Form, FormItem, Modal as Modal$1 } from "ant-design-vue";
7
8
  import { defineStore } from "pinia";
9
+ import "ant-design-vue/es/radio/style";
10
+ import "ant-design-vue/es/cascader/style";
11
+ import "ant-design-vue/es/input-number/style";
12
+ import "ant-design-vue/es/switch/style";
13
+ import "ant-design-vue/es/tree-select/style";
14
+ import "ant-design-vue/es/slider/style";
15
+ import "ant-design-vue/es/rate/style";
16
+ import "ant-design-vue/es/date-picker/style";
17
+ import "ant-design-vue/es/col/style";
8
18
  import "ant-design-vue/es/button/style";
9
19
  import dayjs from "dayjs";
10
- const _default = "";
11
- const index$3 = "";
20
+ import "ant-design-vue/es/spin/style";
21
+ import "ant-design-vue/es/modal/style";
22
+ import "ant-design-vue/es/tooltip/style";
12
23
  var Theme = /* @__PURE__ */ ((Theme2) => {
13
24
  Theme2["DARK"] = "dark";
14
25
  Theme2["LIGHT"] = "light";
@@ -145,12 +156,12 @@ defineStore({
145
156
  return;
146
157
  }
147
158
  let updateIndex = -1;
148
- const tabHasExits = this.tabList.some((tab, index2) => {
149
- updateIndex = index2;
159
+ const tabHasExits = this.tabList.some((tab, index) => {
160
+ updateIndex = index;
150
161
  return (tab.fullPath || tab.path) === (fullPath || path);
151
162
  });
152
163
  if (tabHasExits) {
153
- const curTab = toRaw$1(this.tabList)[updateIndex];
164
+ const curTab = toRaw(this.tabList)[updateIndex];
154
165
  curTab.params = params || curTab.params;
155
166
  curTab.query = query || curTab.query;
156
167
  curTab.fullPath = fullPath || curTab.fullPath;
@@ -162,14 +173,14 @@ defineStore({
162
173
  },
163
174
  closeTab(path, router) {
164
175
  const go = useGo(router);
165
- const index2 = this.tabList.findIndex((item) => item.path === path);
176
+ const index = this.tabList.findIndex((item) => item.path === path);
166
177
  let page;
167
- if (index2 === 0) {
178
+ if (index === 0) {
168
179
  if (this.tabList.length !== 1) {
169
- page = this.tabList[index2 + 1];
180
+ page = this.tabList[index + 1];
170
181
  }
171
182
  } else {
172
- page = this.tabList[index2 - 1];
183
+ page = this.tabList[index - 1];
173
184
  }
174
185
  this.bulkCloseTabs([path]);
175
186
  this.updateCacheTab();
@@ -178,15 +189,15 @@ defineStore({
178
189
  closeAllTab(currentRoute, router) {
179
190
  const go = useGo(router);
180
191
  let filterTabList = this.tabList.filter((item) => item?.meta?.affix ?? false);
181
- const route = filterTabList.length > 0 ? filterTabList[filterTabList.length - 1] : unref$1(currentRoute);
192
+ const route = filterTabList.length > 0 ? filterTabList[filterTabList.length - 1] : unref(currentRoute);
182
193
  this.tabList = [route];
183
194
  this.updateCacheTab();
184
195
  go(route.path);
185
196
  },
186
197
  closeLeftTabs(path) {
187
- const index2 = this.tabList.findIndex((item) => item.path === path);
188
- if (index2 > 0) {
189
- const leftTabs = this.tabList.slice(0, index2);
198
+ const index = this.tabList.findIndex((item) => item.path === path);
199
+ if (index > 0) {
200
+ const leftTabs = this.tabList.slice(0, index);
190
201
  const pathList = [];
191
202
  for (const item of leftTabs) {
192
203
  const affix = item?.meta?.affix ?? false;
@@ -199,9 +210,9 @@ defineStore({
199
210
  this.updateCacheTab();
200
211
  },
201
212
  closeRightTabs(path) {
202
- const index2 = this.tabList.findIndex((item) => item.path === path);
203
- if (index2 >= 0 && index2 < this.tabList.length - 1) {
204
- const rightTabs = this.tabList.slice(index2 + 1, this.tabList.length);
213
+ const index = this.tabList.findIndex((item) => item.path === path);
214
+ if (index >= 0 && index < this.tabList.length - 1) {
215
+ const rightTabs = this.tabList.slice(index + 1, this.tabList.length);
205
216
  const pathList = [];
206
217
  for (const item of rightTabs) {
207
218
  const affix = item?.meta?.affix ?? false;
@@ -241,7 +252,7 @@ defineStore({
241
252
  this.cacheTabList = cacheMap;
242
253
  },
243
254
  async refreshPage(router) {
244
- const findTab = this.getCachedTabList.find((item) => item === unref$1(router.currentRoute).name);
255
+ const findTab = this.getCachedTabList.find((item) => item === unref(router.currentRoute).name);
245
256
  if (findTab) {
246
257
  this.cacheTabList.delete(findTab.toString());
247
258
  }
@@ -263,36 +274,36 @@ function useMenu() {
263
274
  const getMenuFixed = computed(() => getMenuConf.fixed);
264
275
  const getShowMenu = computed(() => getMenuConf.show);
265
276
  const getShowSidebar = computed(() => {
266
- return unref$1(getSplit) || unref$1(getShowMenu) && unref$1(getMenuMode) !== MenuMode.HORIZONTAL;
277
+ return unref(getSplit) || unref(getShowMenu) && unref(getMenuMode) !== MenuMode.HORIZONTAL;
267
278
  });
268
279
  const getMenuHidden = computed(() => getMenuConf.hidden);
269
280
  const getMenuTheme = computed(() => getMenuConf.theme);
270
281
  const getTrigger = computed(() => getMenuConf.trigger);
271
282
  const getCanDrag = computed(() => getMenuConf.canDrag);
272
283
  const getIsMixMode = computed(() => {
273
- return unref$1(getMenuMode) === MenuMode.INLINE && unref$1(getMenuType) === MenuType.MIX;
284
+ return unref(getMenuMode) === MenuMode.INLINE && unref(getMenuType) === MenuType.MIX;
274
285
  });
275
- const getMenuWidth = computed(() => unref$1(getIsMixMode) ? Number(getMenuConf.menuWidth) - 40 : getMenuConf.menuWidth);
286
+ const getMenuWidth = computed(() => unref(getIsMixMode) ? Number(getMenuConf.menuWidth) - 40 : getMenuConf.menuWidth);
276
287
  const getLogoWidth = computed(() => getMenuConf.menuWidth);
277
288
  const getMenuType = computed(() => getMenuConf.type);
278
- const getIsTopMenu = computed(() => unref$1(getMenuType) === MenuType.TOP_MENU);
289
+ const getIsTopMenu = computed(() => unref(getMenuType) === MenuType.TOP_MENU);
279
290
  const getMenuMode = computed(() => getMenuConf.mode);
280
291
  const getSplit = computed(() => getMenuConf.split);
281
292
  const getCollapsed = computed(() => getMenuConf.collapsed);
282
- const getIsHorizontal = computed(() => unref$1(getMenuMode) === MenuMode.HORIZONTAL);
293
+ const getIsHorizontal = computed(() => unref(getMenuMode) === MenuMode.HORIZONTAL);
283
294
  const setThemeStore = (conf = {}) => setThemeConf(conf);
284
295
  const toggleCollapsed = () => setThemeStore({
285
296
  menuOptions: {
286
- collapsed: !unref$1(getCollapsed)
297
+ collapsed: !unref(getCollapsed)
287
298
  }
288
299
  });
289
300
  const getMiniWidthNumber = computed(() => getMenuConf.collapsedShowTitle ? 80 : 48);
290
301
  const getRealWidth = computed(() => {
291
- return unref$1(getCollapsed) ? unref$1(getMiniWidthNumber) : unref$1(getMenuWidth);
302
+ return unref(getCollapsed) ? unref(getMiniWidthNumber) : unref(getMenuWidth);
292
303
  });
293
304
  const getCalcContentWidth = computed(() => {
294
- const width = unref$1(getIsTopMenu) || !unref$1(getShowMenu) || unref$1(getSplit) && unref$1(getMenuHidden) ? 0 : unref$1(getRealWidth);
295
- return `calc(100% - ${unref$1(width)}px)`;
305
+ const width = unref(getIsTopMenu) || !unref(getShowMenu) || unref(getSplit) && unref(getMenuHidden) ? 0 : unref(getRealWidth);
306
+ return `calc(100% - ${unref(width)}px)`;
296
307
  });
297
308
  return {
298
309
  getCollapsedShowTitle,
@@ -353,37 +364,37 @@ function useHeader() {
353
364
  const { getShowMultipleTab } = useMultipleTab();
354
365
  const getHeaderTheme = computed(() => getHeaderConf.theme);
355
366
  const getFixed = computed(() => getHeaderConf.fixed);
356
- const getShowHeaderLogo = computed(() => unref$1(getShowLogo) && !unref$1(getIsSidebarType));
367
+ const getShowHeaderLogo = computed(() => unref(getShowLogo) && !unref(getIsSidebarType));
357
368
  const getShowSearch = computed(() => getHeaderConf.showSearch);
358
369
  const getShowHeaderTrigger = computed(() => {
359
- if (unref$1(getMenuType) === MenuType.TOP_MENU || !unref$1(getShowMenu) || unref$1(getMenuHidden)) {
370
+ if (unref(getMenuType) === MenuType.TOP_MENU || !unref(getShowMenu) || unref(getMenuHidden)) {
360
371
  return false;
361
372
  }
362
- return unref$1(getTrigger);
373
+ return unref(getTrigger);
363
374
  });
364
375
  const getShowBreadCrumb = computed(() => getHeaderConf.showBreadCrumb);
365
376
  const getShowBread = computed(
366
- () => unref$1(getMenuMode) !== MenuMode.HORIZONTAL && !unref$1(getSplit) && unref$1(getShowBreadCrumb)
377
+ () => unref(getMenuMode) !== MenuMode.HORIZONTAL && !unref(getSplit) && unref(getShowBreadCrumb)
367
378
  );
368
- const getShowTopMenu = computed(() => unref$1(getMenuMode) === MenuMode.HORIZONTAL || unref$1(getSplit));
379
+ const getShowTopMenu = computed(() => unref(getMenuMode) === MenuMode.HORIZONTAL || unref(getSplit));
369
380
  const getShowNotice = computed(() => getHeaderConf.showNotice);
370
381
  const getShowFullScreen = computed(() => getHeaderConf.showFullScreen);
371
382
  const getShowLocale = computed(() => getHeaderConf.showLocaleSwitch);
372
383
  const getShowSettingTheme = computed(() => getHeaderConf.showSettingTheme);
373
384
  const getShowFullHeaderRef = computed(() => {
374
- return !unref$1(getIsSidebarType) && !unref$1(getIsTopMenu);
385
+ return !unref(getIsSidebarType) && !unref(getIsTopMenu);
375
386
  });
376
387
  const getHeaderHeight = computed(() => {
377
388
  let height = 0;
378
389
  height += HEADER_HEIGHT;
379
- if (unref$1(getShowMultipleTab) && !unref$1(getSplit)) {
390
+ if (unref(getShowMultipleTab) && !unref(getSplit)) {
380
391
  height += TABS_HEIGHT;
381
392
  }
382
393
  return height;
383
394
  });
384
395
  const getTabsHeight = computed(() => TABS_HEIGHT);
385
396
  const getShowInsetHeaderRef = computed(() => {
386
- return unref$1(getIsSidebarType) || unref$1(getIsTopMenu);
397
+ return unref(getIsSidebarType) || unref(getIsTopMenu);
387
398
  });
388
399
  const getShowBackToTop = computed(() => getHeaderConf.showBackToTop);
389
400
  const getIsZH = computed(() => {
@@ -426,15 +437,15 @@ function useLabelWidth(schemaItemRef, propsRef) {
426
437
  const { getIsZH } = useHeader();
427
438
  const { appConf } = useAppStore();
428
439
  return computed(() => {
429
- const { labelWidth, enLabelWidth, labelCol = {}, wrapperCol = {} } = unref$1(schemaItemRef);
440
+ const { labelWidth, enLabelWidth, labelCol = {}, wrapperCol = {} } = unref(schemaItemRef);
430
441
  const {
431
442
  labelWidth: gLabelWidth,
432
443
  enLabelWidth: gEnLabelWidth,
433
444
  labelCol: glabelCol = {},
434
445
  wrapperCol: gwrapperCol = {},
435
446
  layout = appConf.ui.form.layout
436
- } = unref$1(propsRef);
437
- let width = (unref$1(getIsZH) ? labelWidth ?? gLabelWidth : enLabelWidth ?? gEnLabelWidth) ?? labelWidth ?? gLabelWidth ?? 0;
447
+ } = unref(propsRef);
448
+ let width = (unref(getIsZH) ? labelWidth ?? gLabelWidth : enLabelWidth ?? gEnLabelWidth) ?? labelWidth ?? gLabelWidth ?? 0;
438
449
  const labelcol = { ...glabelCol, ...labelCol };
439
450
  const wrapcol = { ...gwrapperCol, ...wrapperCol };
440
451
  width = isNumber(width) ? `${width}px` : width;
@@ -488,9 +499,8 @@ function handleInputNumberValue(component, val) {
488
499
  }
489
500
  return val;
490
501
  }
491
- const index$2 = "";
492
502
  function useFormValue(props, key = "value", changeEvent = "change", emitData) {
493
- const instance = getCurrentInstance$1();
503
+ const instance = getCurrentInstance();
494
504
  const emit = instance?.emit;
495
505
  const innerState = reactive({
496
506
  value: props[key]
@@ -498,8 +508,8 @@ function useFormValue(props, key = "value", changeEvent = "change", emitData) {
498
508
  const defaultState = readonly(innerState);
499
509
  const setState = (val) => {
500
510
  innerState.value = val;
501
- nextTick$1(() => {
502
- emit?.(changeEvent, val, ...toRaw$1(unref$1(emitData)) || []);
511
+ nextTick(() => {
512
+ emit?.(changeEvent, val, ...toRaw(unref(emitData)) || []);
503
513
  });
504
514
  };
505
515
  watchEffect(() => {
@@ -513,8 +523,8 @@ function useFormValue(props, key = "value", changeEvent = "change", emitData) {
513
523
  if (isEqual(value, defaultState.value))
514
524
  return;
515
525
  innerState.value = value;
516
- nextTick$1(() => {
517
- emit?.(changeEvent, value, ...toRaw$1(unref$1(emitData)) || []);
526
+ nextTick(() => {
527
+ emit?.(changeEvent, value, ...toRaw(unref(emitData)) || []);
518
528
  });
519
529
  }
520
530
  });
@@ -547,13 +557,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
547
557
  return (_ctx, _cache) => {
548
558
  const _component_ARadioButton = RadioButton;
549
559
  const _component_ARadioGroup = RadioGroup;
550
- return openBlock(), createBlock(_component_ARadioGroup, mergeProps(unref$1(attrs), {
551
- value: unref$1(state),
560
+ return openBlock(), createBlock(_component_ARadioGroup, mergeProps(unref(attrs), {
561
+ value: unref(state),
552
562
  "onUpdate:value": _cache[0] || (_cache[0] = ($event) => isRef(state) ? state.value = $event : null),
553
563
  "button-style": "solid"
554
564
  }), {
555
565
  default: withCtx(() => [
556
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(getOptions), (item) => {
566
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptions), (item) => {
557
567
  return openBlock(), createBlock(_component_ARadioButton, {
558
568
  key: `${item.value}`,
559
569
  value: item.value,
@@ -608,9 +618,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
608
618
  return (_ctx, _cache) => {
609
619
  return openBlock(), createElementBlock("div", _hoisted_1$2, [
610
620
  createElementVNode("div", { onClick: onClickInput }, [
611
- createVNode(unref$1(Input), normalizeProps(guardReactiveProps(unref$1(bindProps))), null, 16)
621
+ createVNode(unref(Input), normalizeProps(guardReactiveProps(unref(bindProps))), null, 16)
612
622
  ]),
613
- unref$1(attrs).formValues?.schema?.linkProps?.length ? (openBlock(), createElementBlock("i", {
623
+ unref(attrs).formValues?.schema?.linkProps?.length ? (openBlock(), createElementBlock("i", {
614
624
  key: 0,
615
625
  class: "i mdi:close-circle",
616
626
  onClick: clearProps
@@ -727,7 +737,7 @@ const _sfc_main$b = {
727
737
  return false;
728
738
  }
729
739
  if (isFunction(show)) {
730
- return show(unref$1(getValues).model);
740
+ return show(unref(getValues).model);
731
741
  }
732
742
  return show;
733
743
  });
@@ -739,7 +749,7 @@ const _sfc_main$b = {
739
749
  props: cProps = {}
740
750
  } = schema2;
741
751
  if (isFunction(cProps)) {
742
- cProps = cProps(unref$1(getValues).model) ?? {};
752
+ cProps = cProps(unref(getValues).model) ?? {};
743
753
  }
744
754
  if (schema2.component === "Divider") {
745
755
  cProps = Object.assign({
@@ -763,9 +773,9 @@ const _sfc_main$b = {
763
773
  const {
764
774
  labelCol,
765
775
  wrapperCol
766
- } = unref$1(useLabelWidth(schema, formProps));
776
+ } = unref(useLabelWidth(schema, formProps));
767
777
  const getContent = () => {
768
- const value = unref$1(getValues);
778
+ const value = unref(getValues);
769
779
  let _con = slot ? getSlot(slots, slot, value.model) : render ? render(value.model) : renderFormItem();
770
780
  return component === "InputGroup" || component === "Icon" ? createVNode(FormItem, {
771
781
  "class": "m-0"
@@ -774,15 +784,15 @@ const _sfc_main$b = {
774
784
  }) : _con;
775
785
  };
776
786
  const getSuffix = () => {
777
- return isFunction(suffix) ? suffix(unref$1(getValues).model) : suffix;
787
+ return isFunction(suffix) ? suffix(unref(getValues).model) : suffix;
778
788
  };
779
789
  const getPrefix = () => {
780
- return isFunction(prefix) ? prefix(unref$1(getValues).model) : prefix;
790
+ return isFunction(prefix) ? prefix(unref(getValues).model) : prefix;
781
791
  };
782
792
  return createVNode(Form.Item, {
783
793
  "name": isArray(name) ? name.join("-") : name,
784
794
  "colon": colon,
785
- "class": [unref$1(getUiSize), {
795
+ "class": [unref(getUiSize), {
786
796
  "suffix-item": !!suffix
787
797
  }],
788
798
  "label": renderLabel(),
@@ -811,7 +821,7 @@ const _sfc_main$b = {
811
821
  const renderLabel2 = subLabel ? createVNode("span", null, [createTextVNode(" "), label, createTextVNode(" "), createVNode("span", {
812
822
  "class": "text-secondary opacity-50"
813
823
  }, [createTextVNode("("), subLabel, createTextVNode(")")])]) : label;
814
- const _toolTip = isFunction(toolTip) ? toolTip(unref$1(getValues).model) : toolTip;
824
+ const _toolTip = isFunction(toolTip) ? toolTip(unref(getValues).model) : toolTip;
815
825
  const _toolTipProps = {
816
826
  title: renderLabel2,
817
827
  autoAdjustOverflow: true,
@@ -869,19 +879,19 @@ const _sfc_main$b = {
869
879
  } = props.schema;
870
880
  const {
871
881
  disabled: itemDisabled = false
872
- } = unref$1(getComponentProps);
882
+ } = unref(getComponentProps);
873
883
  let _disabled = !!gDisabled || itemDisabled;
874
884
  if (isBoolean(disabled))
875
885
  _disabled = disabled;
876
886
  if (isFunction(disabled))
877
- _disabled = disabled(unref$1(getValues).model);
887
+ _disabled = disabled(unref(getValues).model);
878
888
  return _disabled;
879
889
  });
880
890
  const itemProps = {
881
891
  allowClear: _sProps?.allowClear ?? appConf.ui.form.allowClear,
882
- size: unref$1(getUiSize) === UiSize.MIDDLE ? "default" : unref$1(getUiSize),
883
- ...unref$1(getComponentProps),
884
- disabled: unref$1(getDisable)
892
+ size: unref(getUiSize) === UiSize.MIDDLE ? "default" : unref(getUiSize),
893
+ ...unref(getComponentProps),
894
+ disabled: unref(getDisable)
885
895
  };
886
896
  if (component === "Select") {
887
897
  {
@@ -890,15 +900,15 @@ const _sfc_main$b = {
890
900
  }
891
901
  }
892
902
  if (!itemProps.disabled && component !== "RangePicker") {
893
- itemProps.placeholder = unref$1(getComponentProps)?.placeholder || createPlaceholder(component);
903
+ itemProps.placeholder = unref(getComponentProps)?.placeholder || createPlaceholder(component);
894
904
  }
895
905
  if (["DatePicker", "MonthPicker", "RangePicker"].includes(component)) {
896
906
  itemProps.defaultValue = props.formModel[name];
897
907
  }
898
908
  itemProps.codeName = name;
899
- itemProps.formValues = unref$1(getValues);
909
+ itemProps.formValues = unref(getValues);
900
910
  if (["Select", "DatePicker", "MonthPicker", "WeekPicker", "RangePicker"].includes(component)) {
901
- itemProps.dropdownClassName += ` ${unref$1(getUiSize)}`;
911
+ itemProps.dropdownClassName += ` ${unref(getUiSize)}`;
902
912
  }
903
913
  const bindValue = {
904
914
  [valueField || (isCheck ? "checked" : "value")]: props.formModel[name]
@@ -913,7 +923,7 @@ const _sfc_main$b = {
913
923
  return createVNode(Comp, compAttr, null);
914
924
  }
915
925
  const compSlot = isFunction(renderComponent) ? {
916
- ...renderComponent(unref$1(getValues))
926
+ ...renderComponent(unref(getValues))
917
927
  } : {
918
928
  default: () => renderComponent
919
929
  };
@@ -932,11 +942,11 @@ const _sfc_main$b = {
932
942
  if (!component)
933
943
  return [];
934
944
  if (isFunction(dynamicRules)) {
935
- return dynamicRules(unref$1(getValues).model);
945
+ return dynamicRules(unref(getValues).model);
936
946
  }
937
947
  const defaultMsg = createPlaceholder(component) + label;
938
948
  let rules = cloneDeep(defaultRules);
939
- const getRequired = isFunction(required) ? required(unref$1(getValues).model) : required;
949
+ const getRequired = isFunction(required) ? required(unref(getValues).model) : required;
940
950
  function validator(rule, value) {
941
951
  const msg = rule.message || defaultMsg;
942
952
  if (value === void 0 || isNull(value) || Array.isArray(value) && value.length === 0 || typeof value === "string" && value.trim() === "" || typeof value === "object" && Reflect.has(value, "checked") && Reflect.has(value, "halfChecked") && Array.isArray(value.checked) && Array.isArray(value.halfChecked) && value.checked.length === 0 && value.halfChecked.length === 0) {
@@ -945,7 +955,7 @@ const _sfc_main$b = {
945
955
  return Promise.resolve();
946
956
  }
947
957
  if (!rules || !rules.length) {
948
- let _required = isBoolean(getRequired) ? getRequired : unref$1(getRequired);
958
+ let _required = isBoolean(getRequired) ? getRequired : unref(getRequired);
949
959
  rules = _required ? [{
950
960
  required: _required,
951
961
  validator
@@ -954,7 +964,7 @@ const _sfc_main$b = {
954
964
  const requiredIndex = rules.findIndex((rule) => Reflect.has(rule, "required") && !Reflect.has(rule, "validator"));
955
965
  if (requiredIndex !== -1) {
956
966
  const rule = rules[requiredIndex];
957
- if (!unref$1(getShow)) {
967
+ if (!unref(getShow)) {
958
968
  rule.required = false;
959
969
  }
960
970
  if (!Reflect.has(rule, "type")) {
@@ -964,7 +974,7 @@ const _sfc_main$b = {
964
974
  if (component.includes("Input") || component.includes("Textarea")) {
965
975
  rule.whitespace = true;
966
976
  }
967
- const valueFormat = unref$1(getComponentProps)?.valueFormat;
977
+ const valueFormat = unref(getComponentProps)?.valueFormat;
968
978
  setComponentRuleType(rule, component, valueFormat);
969
979
  }
970
980
  const maxIndex = rules.findIndex((val) => val.max);
@@ -988,7 +998,7 @@ const _sfc_main$b = {
988
998
  mode
989
999
  } = props.formProps;
990
1000
  let _colProps = colProps || gColProps || (mode === "search" ? appConf.ui.form.searchColspan : appConf.ui.form.dialogColspan);
991
- const values = unref$1(getValues);
1001
+ const values = unref(getValues);
992
1002
  if (!component) {
993
1003
  if (!render && !renderCol && !slot) {
994
1004
  error(t("NEED_RENDER"));
@@ -997,7 +1007,7 @@ const _sfc_main$b = {
997
1007
  }
998
1008
  if (component === "Divider") {
999
1009
  let _slot;
1000
- let cprops = unref$1(getComponentProps);
1010
+ let cprops = unref(getComponentProps);
1001
1011
  const span = cprops?.span ?? 24;
1002
1012
  return createVNode(Col, {
1003
1013
  "span": span
@@ -1010,7 +1020,7 @@ const _sfc_main$b = {
1010
1020
  const getContent = () => {
1011
1021
  return colSlot ? getSlot(slots, colSlot, values) : renderCol ? renderCol(values) : renderItem();
1012
1022
  };
1013
- return unref$1(getShow) && createVNode(Col, _colProps, _isSlot$1(_slot2 = getContent()) ? _slot2 : {
1023
+ return unref(getShow) && createVNode(Col, _colProps, _isSlot$1(_slot2 = getContent()) ? _slot2 : {
1014
1024
  default: () => [_slot2]
1015
1025
  });
1016
1026
  };
@@ -1062,7 +1072,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1062
1072
  setup(__props, { emit: emits }) {
1063
1073
  const props = __props;
1064
1074
  const { t } = useI18n();
1065
- const advancedRef = ref$1(props.isAdvanced);
1075
+ const advancedRef = ref(props.isAdvanced);
1066
1076
  let key = 0;
1067
1077
  const showAdvanceRef = computed(() => {
1068
1078
  return props.mode === "search" ? props.showAdvancedButton : false;
@@ -1098,7 +1108,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1098
1108
  }
1099
1109
  watch(() => props.isAdvanced, (v) => {
1100
1110
  if (v) {
1101
- nextTick$1(() => toggleAdvanced());
1111
+ nextTick(() => toggleAdvanced());
1102
1112
  }
1103
1113
  }, {
1104
1114
  immediate: true
@@ -1117,7 +1127,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1117
1127
  const _component_ACol = Col$1;
1118
1128
  const _directive_icon = resolveDirective("icon");
1119
1129
  const _directive_auth = resolveDirective("auth");
1120
- return __props.show ? (openBlock(), createBlock(_component_ACol, normalizeProps(mergeProps({ key: 0 }, unref$1(colOpt))), {
1130
+ return __props.show ? (openBlock(), createBlock(_component_ACol, normalizeProps(mergeProps({ key: 0 }, unref(colOpt))), {
1121
1131
  default: withCtx(() => [
1122
1132
  createVNode(_component_AFormItem, {
1123
1133
  class: "dt-form-btns",
@@ -1131,9 +1141,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1131
1141
  (button.show === void 0 ? true : button.show) ? withDirectives((openBlock(), createBlock(_component_AButton, {
1132
1142
  type: button.type,
1133
1143
  class: normalizeClass(button.class),
1134
- loading: button.loading?.value,
1144
+ loading: button.loading,
1135
1145
  disabled: button.disabled,
1136
- key: unref$1(key),
1146
+ key: unref(key),
1137
1147
  onClick: ($event) => handleBtnClick(button)
1138
1148
  }, {
1139
1149
  icon: withCtx(() => [
@@ -1142,7 +1152,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1142
1152
  ]) : createCommentVNode("v-if", true)
1143
1153
  ]),
1144
1154
  default: withCtx(() => [
1145
- createTextVNode(" " + toDisplayString(unref$1(t)(button.name)) + " ", 1),
1155
+ createTextVNode(" " + toDisplayString(unref(t)(button.name)) + " ", 1),
1146
1156
  button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2, null, 512)), [
1147
1157
  [_directive_icon, button.postIcon]
1148
1158
  ]) : createCommentVNode("v-if", true)
@@ -1153,7 +1163,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1153
1163
  ]) : createCommentVNode("v-if", true)
1154
1164
  ], 64);
1155
1165
  }), 256)),
1156
- unref$1(showAdvanceRef) ? (openBlock(), createBlock(_component_AButton, {
1166
+ unref(showAdvanceRef) ? (openBlock(), createBlock(_component_AButton, {
1157
1167
  key: 0,
1158
1168
  type: "link",
1159
1169
  class: "advanced",
@@ -1161,9 +1171,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1161
1171
  }, {
1162
1172
  default: withCtx(() => [
1163
1173
  createCommentVNode(" \u6536\u8D77 | \u5C55\u5F00 "),
1164
- createElementVNode("span", _hoisted_3, toDisplayString(advancedRef.value ? unref$1(t)("UI.ADVANCED") : unref$1(t)("UI.EXPAND")), 1),
1174
+ createElementVNode("span", _hoisted_3, toDisplayString(advancedRef.value ? unref(t)("UI.ADVANCED") : unref(t)("UI.EXPAND")), 1),
1165
1175
  createElementVNode("span", {
1166
- class: normalizeClass(unref$1(getAdvanceClass))
1176
+ class: normalizeClass(unref(getAdvanceClass))
1167
1177
  }, _hoisted_5, 2)
1168
1178
  ]),
1169
1179
  _: 1
@@ -1195,10 +1205,10 @@ function useFormEvents({
1195
1205
  handleFormValues
1196
1206
  }) {
1197
1207
  function getFormValues() {
1198
- const formEl = unref$1(formElRef);
1208
+ const formEl = unref(formElRef);
1199
1209
  if (!formEl)
1200
1210
  return {};
1201
- return handleFormValues(toRaw$1(unref$1(formModel)));
1211
+ return handleFormValues(toRaw(unref(formModel)));
1202
1212
  }
1203
1213
  function updateSchema(data) {
1204
1214
  let updateItems = [];
@@ -1209,7 +1219,7 @@ function useFormEvents({
1209
1219
  }
1210
1220
  const schema = [];
1211
1221
  updateItems.forEach((it) => {
1212
- unref$1(getSchema).forEach((val) => {
1222
+ unref(getSchema).forEach((val) => {
1213
1223
  if (val.name === it.name) {
1214
1224
  const newSchema = deepMerge(val, it);
1215
1225
  schema.push(newSchema);
@@ -1236,7 +1246,7 @@ function useFormEvents({
1236
1246
  obj[name] = null;
1237
1247
  if (!isNullAndUnDef(it.defaultValue))
1238
1248
  return obj[name] = it.defaultValue;
1239
- let props = isFunction(it.props) ? it.props(toRaw$1(unref$1(formModel))) : it.props;
1249
+ let props = isFunction(it.props) ? it.props(toRaw(unref(formModel))) : it.props;
1240
1250
  if (!isNullAndUnDef(props?.defaultValue))
1241
1251
  obj[name] = props.defaultValue;
1242
1252
  });
@@ -1252,25 +1262,25 @@ function useFormEvents({
1252
1262
  setFormValues(obj);
1253
1263
  }
1254
1264
  async function clearValidate(name) {
1255
- await unref$1(formElRef)?.clearValidate(name);
1265
+ await unref(formElRef)?.clearValidate(name);
1256
1266
  }
1257
1267
  function resetForms() {
1258
- const { resetFunc } = unref$1(getProps);
1268
+ const { resetFunc } = unref(getProps);
1259
1269
  resetFunc && isFunction(resetFunc) && resetFunc();
1260
- if (!unref$1(formElRef))
1270
+ if (!unref(formElRef))
1261
1271
  return;
1262
1272
  Object.keys(formModel).forEach((key) => {
1263
- const schema = unref$1(getSchema).find((item) => item.name === key);
1273
+ const schema = unref(getSchema).find((item) => item.name === key);
1264
1274
  const isInput = schema?.component && ["Input", "InputPassword", "InputSearch", "InputTextArea"].includes(schema.component);
1265
1275
  formModel[key] = isInput ? defaultValue.value[key] || "" : defaultValue.value[key];
1266
1276
  });
1267
- nextTick$1(() => clearValidate());
1268
- emits("reset", toRaw$1(formModel));
1277
+ nextTick(() => clearValidate());
1278
+ emits("reset", toRaw(formModel));
1269
1279
  }
1270
1280
  function removeFormByName(names) {
1271
1281
  if (!names)
1272
1282
  return;
1273
- const schemaList = cloneDeep(unref$1(getSchema));
1283
+ const schemaList = cloneDeep(unref(getSchema));
1274
1284
  const nameList = isString(names) ? [names] : names;
1275
1285
  for (const name of nameList) {
1276
1286
  _removeSchemaByName(name, schemaList);
@@ -1278,32 +1288,32 @@ function useFormEvents({
1278
1288
  schemaRef.value = schemaList;
1279
1289
  }
1280
1290
  function _removeSchemaByName(name, schemaList) {
1281
- const index2 = schemaList.findIndex((schema) => schema.name === name);
1282
- if (index2 !== -1) {
1291
+ const index = schemaList.findIndex((schema) => schema.name === name);
1292
+ if (index !== -1) {
1283
1293
  delete formModel[name];
1284
- schemaList.splice(index2, 1);
1294
+ schemaList.splice(index, 1);
1285
1295
  }
1286
1296
  }
1287
1297
  function appendFormItems(schema, prefixName, first = false) {
1288
- const schemaList = cloneDeep(unref$1(getSchema));
1289
- const index2 = schemaList.findIndex((schema2) => schema2.name === prefixName);
1290
- if (!prefixName || index2 === -1 || first) {
1298
+ const schemaList = cloneDeep(unref(getSchema));
1299
+ const index = schemaList.findIndex((schema2) => schema2.name === prefixName);
1300
+ if (!prefixName || index === -1 || first) {
1291
1301
  first ? schemaList.unshift(...schema) : schemaList.push(...schema);
1292
1302
  schemaRef.value = schemaList;
1293
1303
  return;
1294
1304
  }
1295
- if (index2 !== -1) {
1296
- schemaList.splice(index2 + 1, 0, ...schema);
1305
+ if (index !== -1) {
1306
+ schemaList.splice(index + 1, 0, ...schema);
1297
1307
  }
1298
1308
  schemaRef.value = schemaList;
1299
1309
  }
1300
1310
  function itemIsDateType(key) {
1301
- return unref$1(getSchema).some((item) => {
1311
+ return unref(getSchema).some((item) => {
1302
1312
  return item.name === key ? ["DatePicker", "MonthPicker", "WeekPicker", "TimePicker", "RangePicker"].includes(item.component) : false;
1303
1313
  });
1304
1314
  }
1305
1315
  async function validateFields(nameList) {
1306
- return unref$1(formElRef)?.validateFields(nameList);
1316
+ return unref(formElRef)?.validateFields(nameList);
1307
1317
  }
1308
1318
  function setFormValues(values) {
1309
1319
  if (!values || !Object.keys(values).length) {
@@ -1311,10 +1321,10 @@ function useFormEvents({
1311
1321
  formModel[it] = Array.isArray(formModel[it]) ? [] : null;
1312
1322
  return;
1313
1323
  }
1314
- const names = unref$1(getSchema).map((item) => item.name).filter(Boolean);
1324
+ const names = unref(getSchema).map((item) => item.name).filter(Boolean);
1315
1325
  const validKeys = [];
1316
1326
  Object.keys(values).forEach((key) => {
1317
- const schema = unref$1(getSchema).find((item) => item.name === key);
1327
+ const schema = unref(getSchema).find((item) => item.name === key);
1318
1328
  let value = values[key];
1319
1329
  const hasKey = Reflect.has(values, key);
1320
1330
  value = handleInputNumberValue(schema?.component, value);
@@ -1345,7 +1355,7 @@ function useFormEvents({
1345
1355
  return validateFields(validKeys);
1346
1356
  }
1347
1357
  async function validate(nameList) {
1348
- return await unref$1(formElRef)?.validate(nameList);
1358
+ return await unref(formElRef)?.validate(nameList);
1349
1359
  }
1350
1360
  return {
1351
1361
  getFormValues,
@@ -1367,7 +1377,7 @@ function useFormValues({
1367
1377
  }) {
1368
1378
  const getComMap = () => {
1369
1379
  let comMap = /* @__PURE__ */ new Map();
1370
- unref$1(getSchema).map((it) => {
1380
+ unref(getSchema).map((it) => {
1371
1381
  if (it.component && it.name) {
1372
1382
  comMap.set(it.name, it);
1373
1383
  }
@@ -1404,7 +1414,7 @@ function useFormValues({
1404
1414
  return vals;
1405
1415
  }
1406
1416
  function initDefault() {
1407
- const schema = unref$1(getSchema), obj = {};
1417
+ const schema = unref(getSchema), obj = {};
1408
1418
  schema.forEach((item) => {
1409
1419
  const { props = {}, name, component, defaultValue: gDefaultValue, extraName } = item;
1410
1420
  const { defaultValue: itemDefaultValue, mode, format, treeCheckable } = isFunction(props) ? props(formModel) : props;
@@ -1424,7 +1434,7 @@ function useFormValues({
1424
1434
  if (isArray(defaultValue2)) {
1425
1435
  let vals = defaultValue2.map((it) => format ? dayjs(it, format) : dayjs(it));
1426
1436
  if (names.length > 1) {
1427
- names.map((key, index2) => obj[key] = vals[index2] ?? null);
1437
+ names.map((key, index) => obj[key] = vals[index] ?? null);
1428
1438
  } else {
1429
1439
  obj[names[0]] = vals;
1430
1440
  }
@@ -1433,11 +1443,11 @@ function useFormValues({
1433
1443
  }
1434
1444
  } else {
1435
1445
  if (names.length > 1) {
1436
- names.forEach((key, index2) => {
1437
- if (!defaultValue2 || defaultValue2.length - 1 < index2) {
1446
+ names.forEach((key, index) => {
1447
+ if (!defaultValue2 || defaultValue2.length - 1 < index) {
1438
1448
  obj[key] = null;
1439
1449
  } else {
1440
- obj[key] = defaultValue2[index2];
1450
+ obj[key] = defaultValue2[index];
1441
1451
  }
1442
1452
  });
1443
1453
  } else {
@@ -1468,9 +1478,9 @@ function useFormActions(opt) {
1468
1478
  const { getProps, defaultValue, updateSchema, getFormValues, setFormValues } = opt;
1469
1479
  const { appConf } = useAppStore();
1470
1480
  function handleAdvanced(isAdvanced) {
1471
- const { schemas, minShowColumn = appConf.ui.form?.minShowColumn || 2 } = unref$1(getProps);
1472
- let schema = schemas.reduce((t, it, index2) => {
1473
- if (index2 > minShowColumn - 1)
1481
+ const { schemas, minShowColumn = appConf.ui.form?.minShowColumn || 2 } = unref(getProps);
1482
+ let schema = schemas.reduce((t, it, index) => {
1483
+ if (index > minShowColumn - 1)
1474
1484
  it.isAdvanced = isAdvanced;
1475
1485
  t.push(it);
1476
1486
  return t;
@@ -1478,11 +1488,10 @@ function useFormActions(opt) {
1478
1488
  updateSchema(schema);
1479
1489
  }
1480
1490
  function handleMethod(params) {
1481
- const { onSearch, onReset } = unref$1(getProps);
1491
+ const { onSearch, onReset } = unref(getProps);
1482
1492
  if (isBoolean(params)) {
1483
1493
  handleAdvanced(params);
1484
1494
  } else if (params.name === SEARCH_BTN_NAME) {
1485
- console.log(getProps);
1486
1495
  onSearch(getFormValues());
1487
1496
  } else if (params.name === RESET_BTN_NAME) {
1488
1497
  setFormValues(toRaw(defaultValue.value));
@@ -1586,8 +1595,8 @@ const BasicProps = {
1586
1595
  type: Object,
1587
1596
  default: () => {
1588
1597
  return {
1589
- onSearch: ref$1(false),
1590
- onReset: ref$1(false)
1598
+ onSearch: ref(false),
1599
+ onReset: ref(false)
1591
1600
  };
1592
1601
  }
1593
1602
  },
@@ -1620,11 +1629,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1620
1629
  const props = __props;
1621
1630
  const { getAppConf } = useAppStore();
1622
1631
  const attrs = useAttrs();
1623
- const formElRef = ref$1(null);
1632
+ const formElRef = ref(null);
1624
1633
  const formModel = reactive({});
1625
- const defaultValue = ref$1({});
1626
- const propsRef = ref$1();
1627
- const schemaRef = ref$1(null);
1634
+ const defaultValue = ref({});
1635
+ const propsRef = ref();
1636
+ const schemaRef = ref(null);
1628
1637
  const getProps = computed(() => {
1629
1638
  let colProps = props.colProps;
1630
1639
  if (isEmpty(props.colProps)) {
@@ -1634,20 +1643,20 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1634
1643
  ...props,
1635
1644
  ...getAppConf.ui.form,
1636
1645
  colProps,
1637
- ...unref$1(propsRef)
1646
+ ...unref(propsRef)
1638
1647
  };
1639
1648
  });
1640
1649
  const getBindValue = computed(() => {
1641
1650
  return {
1642
1651
  ...attrs,
1643
- ...unref$1(getProps)
1652
+ ...unref(getProps)
1644
1653
  };
1645
1654
  });
1646
1655
  const getSchema = computed(() => {
1647
- return unref$1(schemaRef) || unref$1(getProps).schemas;
1656
+ return unref(schemaRef) || unref(getProps).schemas;
1648
1657
  });
1649
1658
  const getFormClass = computed(() => {
1650
- const { compact, mode } = unref$1(getProps);
1659
+ const { compact, mode } = unref(getProps);
1651
1660
  const getCompact = compact === null ? mode === "dialog" ? false : true : compact;
1652
1661
  return [
1653
1662
  "basic-form",
@@ -1658,12 +1667,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1658
1667
  ];
1659
1668
  });
1660
1669
  function setProps(formProps) {
1661
- propsRef.value = deepMerge(unref$1(propsRef) || {}, formProps);
1670
+ propsRef.value = deepMerge(unref(propsRef) || {}, formProps);
1662
1671
  return null;
1663
1672
  }
1664
1673
  function setFormModel(key, value) {
1665
1674
  formModel[key] = value;
1666
- const { validateTrigger } = unref$1(getBindValue);
1675
+ const { validateTrigger } = unref(getBindValue);
1667
1676
  if (!validateTrigger || validateTrigger === "change") {
1668
1677
  validateFields([key]);
1669
1678
  }
@@ -1717,7 +1726,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1717
1726
  showAdvancedButton: advanced,
1718
1727
  loading,
1719
1728
  buttons
1720
- } = unref$1(getProps);
1729
+ } = unref(getProps);
1721
1730
  let showAdvancedButton = mode === "search" ? true : false;
1722
1731
  if (advanced !== void 0) {
1723
1732
  showAdvancedButton = advanced;
@@ -1750,16 +1759,19 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1750
1759
  getFormValues,
1751
1760
  setFormValues
1752
1761
  });
1753
- onMounted$1(() => {
1762
+ onMounted(() => {
1754
1763
  setFormValues(null);
1755
1764
  emits("register", formActionMethods);
1756
1765
  initDefault();
1766
+ if (unref(getProps)?.registerInstance) {
1767
+ unref(getProps)?.registerInstance(formActionMethods);
1768
+ }
1757
1769
  });
1758
1770
  watch(
1759
- () => unref$1(getProps).onSearch,
1771
+ () => unref(getProps).onSearch,
1760
1772
  () => {
1761
1773
  useTimeoutFn(() => {
1762
- const { onSearch, autoFetch } = unref$1(getProps);
1774
+ const { onSearch, autoFetch } = unref(getProps);
1763
1775
  if (autoFetch && onSearch && isFunction(onSearch)) {
1764
1776
  onSearch(toRaw(defaultValue.value));
1765
1777
  }
@@ -1767,9 +1779,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1767
1779
  }
1768
1780
  );
1769
1781
  watch(
1770
- () => unref$1(getProps).model,
1782
+ () => unref(getProps).model,
1771
1783
  (v) => {
1772
- const { model } = unref$1(getProps);
1784
+ const { model } = unref(getProps);
1773
1785
  if (!model || !Object.keys(model).length)
1774
1786
  return;
1775
1787
  setFormValues(model);
@@ -1782,24 +1794,24 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1782
1794
  return (_ctx, _cache) => {
1783
1795
  const _component_ARow = Row;
1784
1796
  const _component_AForm = Form$1;
1785
- return openBlock(), createBlock(_component_AForm, mergeProps(unref$1(getBindValue), {
1797
+ return openBlock(), createBlock(_component_AForm, mergeProps(unref(getBindValue), {
1786
1798
  ref_key: "formElRef",
1787
1799
  ref: formElRef,
1788
- class: unref$1(getFormClass),
1800
+ class: unref(getFormClass),
1789
1801
  model: formModel,
1790
- layout: unref$1(getProps).layout,
1802
+ layout: unref(getProps).layout,
1791
1803
  onKeypress: withKeys(handleEnterPress, ["enter"])
1792
1804
  }), {
1793
1805
  default: withCtx(() => [
1794
- createVNode(_component_ARow, mergeProps(unref$1(getProps).rowProps, { style: {
1806
+ createVNode(_component_ARow, mergeProps(unref(getProps).rowProps, { style: {
1795
1807
  margin: 0
1796
1808
  } }), {
1797
1809
  default: withCtx(() => [
1798
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(getSchema), (schema) => {
1799
- return openBlock(), createBlock(unref$1(DtFormItem), {
1810
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSchema), (schema) => {
1811
+ return openBlock(), createBlock(unref(DtFormItem), {
1800
1812
  key: schema.name,
1801
1813
  schema,
1802
- formProps: unref$1(getProps),
1814
+ formProps: unref(getProps),
1803
1815
  formModel,
1804
1816
  defaultValues: defaultValue.value,
1805
1817
  setFormModel,
@@ -1815,7 +1827,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1815
1827
  })
1816
1828
  ]), 1032, ["schema", "formProps", "formModel", "defaultValues"]);
1817
1829
  }), 128)),
1818
- unref$1(getActionsProps).buttonList?.length ? (openBlock(), createBlock(unref$1(DtFormButtons), mergeProps({ key: 0 }, unref$1(getActionsProps), { onHandleMethod: unref$1(handleMethod) }), null, 16, ["onHandleMethod"])) : createCommentVNode("v-if", true)
1830
+ unref(getActionsProps).buttonList?.length ? (openBlock(), createBlock(unref(DtFormButtons), mergeProps({ key: 0 }, unref(getActionsProps), { onHandleMethod: unref(handleMethod) }), null, 16, ["onHandleMethod"])) : createCommentVNode("v-if", true)
1819
1831
  ]),
1820
1832
  _: 3
1821
1833
  }, 16)
@@ -1827,10 +1839,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1827
1839
  });
1828
1840
  const Forms = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/index.vue"]]);
1829
1841
  function useForm(props) {
1830
- const formRef = ref$1(null);
1831
- const loadedRef = ref$1(false);
1842
+ const formRef = ref(null);
1843
+ const loadedRef = ref(false);
1832
1844
  function register(instance) {
1833
- if (unref$1(loadedRef) && instance === unref$1(formRef))
1845
+ if (unref(loadedRef) && instance === unref(formRef))
1834
1846
  return;
1835
1847
  formRef.value = instance;
1836
1848
  loadedRef.value = true;
@@ -1844,10 +1856,10 @@ function useForm(props) {
1844
1856
  );
1845
1857
  }
1846
1858
  async function getForm() {
1847
- const form = unref$1(formRef);
1859
+ const form = unref(formRef);
1848
1860
  if (!form)
1849
1861
  console.error("\u8868\u5355\u672A\u7533\u660E!");
1850
- await nextTick$1();
1862
+ await nextTick();
1851
1863
  return form;
1852
1864
  }
1853
1865
  const methods = {
@@ -1872,7 +1884,7 @@ function useForm(props) {
1872
1884
  form.resetForms();
1873
1885
  },
1874
1886
  removeFormByName: async (name) => {
1875
- unref$1(formRef)?.removeFormByName(name);
1887
+ unref(formRef)?.removeFormByName(name);
1876
1888
  },
1877
1889
  setFormValues: async (values) => {
1878
1890
  const form = await getForm();
@@ -1891,7 +1903,7 @@ function useForm(props) {
1891
1903
  return form.validateFields(nameList);
1892
1904
  },
1893
1905
  getFormValues: () => {
1894
- return unref$1(formRef)?.getFormValues();
1906
+ return unref(formRef)?.getFormValues();
1895
1907
  }
1896
1908
  };
1897
1909
  return [register, methods];
@@ -1907,9 +1919,9 @@ const orgDialogProp = reactive({});
1907
1919
  const cbTransfer = reactive({});
1908
1920
  const dataTransfer = reactive({});
1909
1921
  function useModalOut() {
1910
- const modal = ref$1(null);
1911
- const loaded = ref$1(true);
1912
- const uid = ref$1(null);
1922
+ const modal = ref(null);
1923
+ const loaded = ref(true);
1924
+ const uid = ref(null);
1913
1925
  const { isProd } = useApp();
1914
1926
  function register(modalMethod, uuid) {
1915
1927
  if (!getCurrentInstance()) {
@@ -1917,22 +1929,22 @@ function useModalOut() {
1917
1929
  }
1918
1930
  uid.value = uuid;
1919
1931
  onUnmounted(() => {
1920
- if (unref$1(isProd)) {
1932
+ if (unref(isProd)) {
1921
1933
  modal.value = null;
1922
1934
  loaded.value = false;
1923
- dataTransfer[unref$1(uid)] = null;
1924
- orgDialogProp[unref$1(uid)] = null;
1925
- cbTransfer[unref$1(uid)] = (res) => {
1935
+ dataTransfer[unref(uid)] = null;
1936
+ orgDialogProp[unref(uid)] = null;
1937
+ cbTransfer[unref(uid)] = (res) => {
1926
1938
  };
1927
1939
  }
1928
1940
  });
1929
- if (unref$1(loaded) && modalMethod === unref$1(modal))
1941
+ if (unref(loaded) && modalMethod === unref(modal))
1930
1942
  return;
1931
1943
  modal.value = modalMethod;
1932
1944
  loaded.value = true;
1933
1945
  }
1934
1946
  const getInstance = () => {
1935
- const instance = unref$1(modal);
1947
+ const instance = unref(modal);
1936
1948
  if (!instance) {
1937
1949
  error("useModalOut \u5B9E\u4F8B\u672A\u5B9A\u4E49");
1938
1950
  }
@@ -1946,7 +1958,7 @@ function useModalOut() {
1946
1958
  getInstance()?.redoModalHeight?.();
1947
1959
  },
1948
1960
  openModal: (params, afterClose) => {
1949
- const id = unref$1(uid);
1961
+ const id = unref(uid);
1950
1962
  dataTransfer[id] = isObject(params) ? { ...toRaw(params) } : params;
1951
1963
  getInstance()?.setModalProps({
1952
1964
  footer: [],
@@ -1967,19 +1979,19 @@ function useModalOut() {
1967
1979
  return [register, methods];
1968
1980
  }
1969
1981
  function useModal(props, setModalData) {
1970
- const modalInstanceRef = ref$1(null);
1982
+ const modalInstanceRef = ref(null);
1971
1983
  const currentInstance = getCurrentInstance();
1972
- const uidRef = ref$1(null);
1984
+ const uidRef = ref(null);
1973
1985
  const { isProd } = useApp();
1974
1986
  const getInstance = () => {
1975
- const instance = unref$1(modalInstanceRef);
1987
+ const instance = unref(modalInstanceRef);
1976
1988
  if (!instance) {
1977
1989
  error("useModal \u5B9E\u4F8B\u672A\u5B9A\u4E49");
1978
1990
  }
1979
1991
  return instance;
1980
1992
  };
1981
1993
  const register = (modalInstance, uuid) => {
1982
- if (unref$1(isProd)) {
1994
+ if (unref(isProd)) {
1983
1995
  modalInstanceRef.value = null;
1984
1996
  }
1985
1997
  uidRef.value = uuid;
@@ -1989,12 +2001,12 @@ function useModal(props, setModalData) {
1989
2001
  modalInstance.setModalProps(props);
1990
2002
  };
1991
2003
  watchEffect(() => {
1992
- const data = dataTransfer[unref$1(uidRef)];
2004
+ const data = dataTransfer[unref(uidRef)];
1993
2005
  if (!data)
1994
2006
  return;
1995
2007
  if (!setModalData || !isFunction(setModalData))
1996
2008
  return;
1997
- nextTick$1(() => {
2009
+ nextTick(() => {
1998
2010
  setModalData(data);
1999
2011
  });
2000
2012
  });
@@ -2003,8 +2015,8 @@ function useModal(props, setModalData) {
2003
2015
  getInstance()?.setModalProps({ loading });
2004
2016
  },
2005
2017
  closeModal: (rsp) => {
2006
- if (cbTransfer[unref$1(uidRef)])
2007
- cbTransfer[unref$1(uidRef)](rsp);
2018
+ if (cbTransfer[unref(uidRef)])
2019
+ cbTransfer[unref(uidRef)](rsp);
2008
2020
  getInstance()?.setModalProps({ visible: false });
2009
2021
  },
2010
2022
  setModalProps: (props2) => {
@@ -2017,7 +2029,6 @@ function useModal(props, setModalData) {
2017
2029
  };
2018
2030
  return [register, methods];
2019
2031
  }
2020
- const index$1 = "";
2021
2032
  const basicProps$1 = {
2022
2033
  t: {
2023
2034
  type: String
@@ -2096,10 +2107,10 @@ function useDragMove(context) {
2096
2107
  const drag = (wrap) => {
2097
2108
  if (!wrap)
2098
2109
  return;
2099
- wrap.setAttribute("data-drag", unref$1(context.draggable));
2110
+ wrap.setAttribute("data-drag", unref(context.draggable));
2100
2111
  const dialogHeaderEl = wrap.querySelector(".ant-modal-header");
2101
2112
  const dragDom = wrap.querySelector(".ant-modal");
2102
- if (!dialogHeaderEl || !dragDom || !unref$1(context.draggable))
2113
+ if (!dialogHeaderEl || !dragDom || !unref(context.draggable))
2103
2114
  return;
2104
2115
  dialogHeaderEl.style.cursor = "move";
2105
2116
  dialogHeaderEl.onmousedown = (e) => {
@@ -2156,14 +2167,14 @@ function useDragMove(context) {
2156
2167
  const display = getStyle(wrap, "display");
2157
2168
  const draggable = wrap.getAttribute("data-drag");
2158
2169
  if (display !== "none") {
2159
- if (draggable === null || unref$1(context.destroyOnClose)) {
2170
+ if (draggable === null || unref(context.destroyOnClose)) {
2160
2171
  drag(wrap);
2161
2172
  }
2162
2173
  }
2163
2174
  }
2164
2175
  };
2165
2176
  watchEffect(() => {
2166
- if (!unref$1(context.visible) || !unref$1(context.draggable)) {
2177
+ if (!unref(context.visible) || !unref(context.draggable)) {
2167
2178
  return;
2168
2179
  }
2169
2180
  useTimeoutFn(() => {
@@ -2201,7 +2212,7 @@ const _sfc_main$8 = {
2201
2212
  return () => {
2202
2213
  let _slot;
2203
2214
  const propsData = {
2204
- ...unref$1(attrs),
2215
+ ...unref(attrs),
2205
2216
  ...props,
2206
2217
  destroyOnClose: true,
2207
2218
  onCancel
@@ -2215,7 +2226,6 @@ const _sfc_main$8 = {
2215
2226
  }
2216
2227
  };
2217
2228
  const Modal = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/components/Modal.vue"]]);
2218
- const index = "";
2219
2229
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2220
2230
  __name: "CloseIcon",
2221
2231
  props: {
@@ -2246,12 +2256,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2246
2256
  return (_ctx, _cache) => {
2247
2257
  const _component_ATooltip = Tooltip$1;
2248
2258
  return openBlock(), createElementBlock("div", {
2249
- class: normalizeClass(["flex h-14 items-center justify-center", unref$1(getClass)])
2259
+ class: normalizeClass(["flex h-14 items-center justify-center", unref(getClass)])
2250
2260
  }, [
2251
2261
  __props.canFullscreen ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2252
2262
  __props.fullScreen ? (openBlock(), createBlock(_component_ATooltip, {
2253
2263
  key: 0,
2254
- title: unref$1(t)("EXIT_FULLSCREEN"),
2264
+ title: unref(t)("EXIT_FULLSCREEN"),
2255
2265
  placement: "bottom"
2256
2266
  }, {
2257
2267
  default: withCtx(() => [
@@ -2263,7 +2273,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2263
2273
  _: 1
2264
2274
  }, 8, ["title"])) : (openBlock(), createBlock(_component_ATooltip, {
2265
2275
  key: 1,
2266
- title: unref$1(t)("FULLSCREEN"),
2276
+ title: unref(t)("FULLSCREEN"),
2267
2277
  placement: "bottom"
2268
2278
  }, {
2269
2279
  default: withCtx(() => [
@@ -2352,14 +2362,14 @@ const Bar = defineComponent({
2352
2362
  move: Number
2353
2363
  },
2354
2364
  setup(props) {
2355
- const instance = getCurrentInstance$1();
2356
- const thumb = ref$1();
2365
+ const instance = getCurrentInstance();
2366
+ const thumb = ref();
2357
2367
  const wrap = inject("scroll-bar-wrap", {});
2358
2368
  const bar = computed(() => {
2359
2369
  return BAR_MAP[props.vertical ? "vertical" : "horizontal"];
2360
2370
  });
2361
- const barStore = ref$1({});
2362
- const cursorDown = ref$1();
2371
+ const barStore = ref({});
2372
+ const cursorDown = ref();
2363
2373
  const clickThumbHandler = (e) => {
2364
2374
  if (e.ctrlKey || e.button === 2) {
2365
2375
  return;
@@ -2447,12 +2457,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2447
2457
  },
2448
2458
  setup(__props) {
2449
2459
  const props = __props;
2450
- const sizeWidth = ref$1("0");
2451
- const sizeHeight = ref$1("0");
2452
- const moveX = ref$1(0);
2453
- const moveY = ref$1(0);
2454
- const wrap = ref$1();
2455
- const resize = ref$1();
2460
+ const sizeWidth = ref("0");
2461
+ const sizeHeight = ref("0");
2462
+ const moveX = ref(0);
2463
+ const moveY = ref(0);
2464
+ const wrap = ref();
2465
+ const resize = ref();
2456
2466
  provide("scroll-bar-wrap", wrap);
2457
2467
  const style = computed(() => {
2458
2468
  let rsStyle = {};
@@ -2465,29 +2475,29 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2465
2475
  return rsStyle;
2466
2476
  });
2467
2477
  const handleScroll = () => {
2468
- moveY.value = unref$1(wrap).scrollTop * 100 / unref$1(wrap).clientHeight;
2469
- moveX.value = unref$1(wrap).scrollLeft * 100 / unref$1(wrap).clientWidth;
2478
+ moveY.value = unref(wrap).scrollTop * 100 / unref(wrap).clientHeight;
2479
+ moveX.value = unref(wrap).scrollLeft * 100 / unref(wrap).clientWidth;
2470
2480
  };
2471
2481
  const update = () => {
2472
- if (!unref$1(wrap))
2482
+ if (!unref(wrap))
2473
2483
  return;
2474
- const heightPercentage = unref$1(wrap).clientHeight * 100 / unref$1(wrap).scrollHeight;
2475
- const widthPercentage = unref$1(wrap).clientWidth * 100 / unref$1(wrap).scrollWidth;
2484
+ const heightPercentage = unref(wrap).clientHeight * 100 / unref(wrap).scrollHeight;
2485
+ const widthPercentage = unref(wrap).clientWidth * 100 / unref(wrap).scrollWidth;
2476
2486
  sizeHeight.value = heightPercentage < 100 ? heightPercentage + "%" : "";
2477
2487
  sizeWidth.value = widthPercentage < 100 ? widthPercentage + "%" : "";
2478
2488
  };
2479
- onMounted$1(() => {
2480
- nextTick$1(update);
2489
+ onMounted(() => {
2490
+ nextTick(update);
2481
2491
  if (!props.noresize) {
2482
- addResizeListener(unref$1(resize), update);
2483
- addResizeListener(unref$1(wrap), update);
2492
+ addResizeListener(unref(resize), update);
2493
+ addResizeListener(unref(wrap), update);
2484
2494
  addEventListener("resize", update);
2485
2495
  }
2486
2496
  });
2487
2497
  onBeforeUnmount(() => {
2488
2498
  if (!props.noresize) {
2489
- removeResizeListener(unref$1(resize), update);
2490
- removeResizeListener(unref$1(wrap), update);
2499
+ removeResizeListener(unref(resize), update);
2500
+ removeResizeListener(unref(wrap), update);
2491
2501
  removeEventListener("resize", update);
2492
2502
  }
2493
2503
  });
@@ -2497,7 +2507,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2497
2507
  ref_key: "wrap",
2498
2508
  ref: wrap,
2499
2509
  class: normalizeClass([[__props.wrapClass, "scrollbar__wrap--hidden-default"], "h-full overflow-auto"]),
2500
- style: normalizeStyle(unref$1(style)),
2510
+ style: normalizeStyle(unref(style)),
2501
2511
  onScroll: handleScroll
2502
2512
  }, [
2503
2513
  (openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
@@ -2512,11 +2522,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2512
2522
  _: 3
2513
2523
  }, 8, ["class", "style"]))
2514
2524
  ], 38),
2515
- createVNode(unref$1(Bar), {
2525
+ createVNode(unref(Bar), {
2516
2526
  move: moveX.value,
2517
2527
  size: sizeWidth.value
2518
2528
  }, null, 8, ["move", "size"]),
2519
- createVNode(unref$1(Bar), {
2529
+ createVNode(unref(Bar), {
2520
2530
  vertical: "",
2521
2531
  move: moveY.value,
2522
2532
  size: sizeHeight.value
@@ -2529,7 +2539,7 @@ const ScrollBar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "D:/dt/dt
2529
2539
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2530
2540
  __name: "scroll-container",
2531
2541
  setup(__props) {
2532
- const scrollbarRef = ref$1(null);
2542
+ const scrollbarRef = ref(null);
2533
2543
  return (_ctx, _cache) => {
2534
2544
  return openBlock(), createBlock(ScrollBar, mergeProps({
2535
2545
  ref_key: "scrollbarRef",
@@ -2558,7 +2568,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2558
2568
  const props = __props;
2559
2569
  const Container = h("div", [props.template(props.data)]);
2560
2570
  return (_ctx, _cache) => {
2561
- return openBlock(), createBlock(unref$1(Container));
2571
+ return openBlock(), createBlock(unref(Container));
2562
2572
  };
2563
2573
  }
2564
2574
  });
@@ -2579,15 +2589,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2579
2589
  emits: ["ext-height", "height-change"],
2580
2590
  setup(__props, { emit: emits }) {
2581
2591
  const props = __props;
2582
- const wrapperRef = ref$1(null);
2583
- const wrapRef = ref$1(null);
2584
- const realHeightRef = ref$1(0);
2585
- const minRealHeightRef = ref$1(0);
2592
+ const wrapperRef = ref(null);
2593
+ const wrapRef = ref(null);
2594
+ const realHeightRef = ref(0);
2595
+ const minRealHeightRef = ref(0);
2586
2596
  let realHeight = 0;
2587
2597
  const wrapStyle = computed(() => {
2588
2598
  return {
2589
2599
  minHeight: `${props.minHeight}px`,
2590
- [props.fullScreen ? "height" : "maxHeight"]: `${unref$1(realHeightRef)}px`
2600
+ [props.fullScreen ? "height" : "maxHeight"]: `${unref(realHeightRef)}px`
2591
2601
  };
2592
2602
  });
2593
2603
  onMounted(() => {
@@ -2595,14 +2605,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2595
2605
  emits("ext-height", modalHeaderHeight + modalFooterHeight);
2596
2606
  });
2597
2607
  async function getModalDom() {
2598
- const wrapperRefDom = unref$1(wrapperRef);
2608
+ const wrapperRefDom = unref(wrapperRef);
2599
2609
  if (!wrapperRefDom)
2600
2610
  return;
2601
- const bodyDom = wrapperRefDom.$el.parentElement;
2611
+ const bodyDom = wrapperRefDom.$el.parentElement.parentElement.parentElement;
2602
2612
  if (!bodyDom)
2603
2613
  return;
2604
- bodyDom.style.padding = "0";
2605
- await nextTick$1();
2614
+ bodyDom.style.padding = props.useWrapper ? "24px" : "0";
2615
+ await nextTick();
2606
2616
  const modalDom = bodyDom.parentElement && bodyDom.parentElement.parentElement;
2607
2617
  return modalDom;
2608
2618
  }
@@ -2619,18 +2629,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2619
2629
  if (modalTop < 40) {
2620
2630
  maxHeight -= 26;
2621
2631
  }
2622
- await nextTick$1();
2623
- const warpEl = unref$1(wrapRef);
2632
+ await nextTick();
2633
+ const warpEl = unref(wrapRef);
2624
2634
  if (!warpEl)
2625
2635
  return;
2626
- await nextTick$1();
2636
+ await nextTick();
2627
2637
  realHeight = warpEl.scrollHeight;
2628
2638
  if (props.fullScreen) {
2629
2639
  realHeightRef.value = window.innerHeight - props.modalFooterHeight - props.modalHeaderHeight;
2630
2640
  } else {
2631
2641
  realHeightRef.value = props.height ? props.height : realHeight > maxHeight ? maxHeight : realHeight;
2632
2642
  }
2633
- emits("height-change", unref$1(realHeightRef));
2643
+ emits("height-change", unref(realHeightRef));
2634
2644
  const _modalDom = await getModalDom();
2635
2645
  _modalDom.style.top = (window.innerHeight - _modalDom.offsetHeight) / 2 + "px";
2636
2646
  } catch (error2) {
@@ -2653,7 +2663,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2653
2663
  }
2654
2664
  );
2655
2665
  return (_ctx, _cache) => {
2656
- return openBlock(), createBlock(unref$1(DtScrollContainer), {
2666
+ return openBlock(), createBlock(unref(DtScrollContainer), {
2657
2667
  ref_key: "wrapperRef",
2658
2668
  ref: wrapperRef
2659
2669
  }, {
@@ -2661,7 +2671,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2661
2671
  createElementVNode("div", {
2662
2672
  ref_key: "wrapRef",
2663
2673
  ref: wrapRef,
2664
- style: normalizeStyle(unref$1(wrapStyle))
2674
+ style: normalizeStyle(unref(wrapStyle))
2665
2675
  }, [
2666
2676
  renderSlot(_ctx.$slots, "default")
2667
2677
  ], 4)
@@ -2716,7 +2726,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2716
2726
  renderSlot(_ctx.$slots, "appendFooter"),
2717
2727
  createVNode(DtFormButtons, {
2718
2728
  mode: "dialog",
2719
- buttonList: unref$1(buttonList),
2729
+ buttonList: unref(buttonList),
2720
2730
  onHandleMethod: _cache[0] || (_cache[0] = ($event) => handleMethod($event))
2721
2731
  }, null, 8, ["buttonList"])
2722
2732
  ], 64);
@@ -2725,15 +2735,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2725
2735
  });
2726
2736
  const ModalFooter = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/components/ModalFooter.vue"]]);
2727
2737
  function useFullScreen(wrapClassName) {
2728
- const fullScreenRef = ref$1(false);
2738
+ const fullScreenRef = ref(false);
2729
2739
  const getWrapClassName = computed(() => {
2730
- const clsName = unref$1(wrapClassName) || "";
2731
- const cls = unref$1(fullScreenRef) ? `fullscreen-modal ${clsName} ` : unref$1(clsName);
2740
+ const clsName = unref(wrapClassName) || "";
2741
+ const cls = unref(fullScreenRef) ? `fullscreen-modal ${clsName} ` : unref(clsName);
2732
2742
  return `dt-modal ${cls}`;
2733
2743
  });
2734
2744
  function toggleFullScreen(e) {
2735
2745
  e && e.stopPropagation();
2736
- fullScreenRef.value = !unref$1(fullScreenRef);
2746
+ fullScreenRef.value = !unref(fullScreenRef);
2737
2747
  dispatchResize();
2738
2748
  }
2739
2749
  return {
@@ -2748,46 +2758,46 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2748
2758
  emits: ["visible-change", "height-change", "cancel", "save", "register", "update:visible"],
2749
2759
  setup(__props, { emit: emits }) {
2750
2760
  const props = __props;
2751
- const visibleRef = ref$1(false);
2752
- const propsRef = ref$1();
2753
- const modalWrapperRef = ref$1(null);
2754
- const { getWrapClassName, toggleFullScreen, fullScreenRef } = useFullScreen(computed(() => unref$1(propsRef)?.wrapClassName));
2761
+ const visibleRef = ref(false);
2762
+ const propsRef = ref();
2763
+ const modalWrapperRef = ref(null);
2764
+ const { getWrapClassName, toggleFullScreen, fullScreenRef } = useFullScreen(computed(() => unref(propsRef)?.wrapClassName));
2755
2765
  const getMergeProps = computed(() => {
2756
2766
  return {
2757
2767
  ...props,
2758
- ...unref$1(propsRef)
2768
+ ...unref(propsRef)
2759
2769
  };
2760
2770
  });
2761
2771
  const getBindValue = computed(() => {
2762
2772
  const bindValue = {
2763
- ...unref$1(getMergeProps),
2764
- ...unref$1(propsRef),
2765
- visible: unref$1(visibleRef),
2766
- wrapClassName: unref$1(getWrapClassName)
2773
+ ...unref(getMergeProps),
2774
+ ...unref(propsRef),
2775
+ visible: unref(visibleRef),
2776
+ wrapClassName: unref(getWrapClassName)
2767
2777
  };
2768
- let omitArr = unref$1(fullScreenRef) ? ["height", "title"] : ["title"];
2769
- if (isArray(unref$1(propsRef)?.footer)) {
2778
+ let omitArr = unref(fullScreenRef) ? ["height", "title"] : ["title"];
2779
+ if (isArray(unref(propsRef)?.footer)) {
2770
2780
  omitArr.push("footer");
2771
2781
  }
2772
2782
  return omit(bindValue, omitArr);
2773
2783
  });
2774
2784
  const getWrapperHeight = computed(() => {
2775
- if (unref$1(fullScreenRef))
2785
+ if (unref(fullScreenRef))
2776
2786
  return void 0;
2777
- return unref$1(getBindValue).height;
2787
+ return unref(getBindValue).height;
2778
2788
  });
2779
2789
  const modalFooterHeight = computed(() => {
2780
2790
  if (isArray(props.footer)) {
2781
- return (unref$1(propsRef)?.footer).length ? 0 : void 0;
2791
+ return (unref(propsRef)?.footer).length ? 0 : void 0;
2782
2792
  }
2783
2793
  return props?.footer !== void 0 && !props.footer ? 0 : void 0;
2784
2794
  });
2785
2795
  const modalMethods = {
2786
2796
  setModalProps,
2787
2797
  redoModalHeight: () => {
2788
- nextTick$1(() => {
2789
- if (unref$1(modalWrapperRef)) {
2790
- unref$1(modalWrapperRef).setModalHeight();
2798
+ nextTick(() => {
2799
+ if (unref(modalWrapperRef)) {
2800
+ unref(modalWrapperRef).setModalHeight();
2791
2801
  }
2792
2802
  });
2793
2803
  }
@@ -2800,7 +2810,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2800
2810
  emits("height-change", height);
2801
2811
  }
2802
2812
  function setModalProps(props2) {
2803
- propsRef.value = deepMerge(unref$1(propsRef) || {}, props2);
2813
+ propsRef.value = deepMerge(unref(propsRef) || {}, props2);
2804
2814
  if (Reflect.has(props2, "visible")) {
2805
2815
  visibleRef.value = !!props2.visible;
2806
2816
  }
@@ -2822,19 +2832,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2822
2832
  return;
2823
2833
  }
2824
2834
  }
2825
- const { afterClose } = unref$1(getBindValue);
2835
+ const { afterClose } = unref(getBindValue);
2826
2836
  if (afterClose && isFunction(afterClose)) {
2827
2837
  afterClose();
2828
2838
  }
2829
2839
  visibleRef.value = false;
2830
2840
  emits("cancel", e);
2831
2841
  }
2832
- watch(() => unref$1(visibleRef), (v) => {
2842
+ watch(() => unref(visibleRef), (v) => {
2833
2843
  emits("visible-change", v);
2834
2844
  emits("update:visible", v);
2835
- nextTick$1(() => {
2836
- if (props.scrollTop && v && unref$1(modalWrapperRef)) {
2837
- unref$1(modalWrapperRef).$el.scrollTop = 0;
2845
+ nextTick(() => {
2846
+ if (props.scrollTop && v && unref(modalWrapperRef)) {
2847
+ unref(modalWrapperRef).$el.scrollTop = 0;
2838
2848
  }
2839
2849
  });
2840
2850
  }, {
@@ -2842,23 +2852,23 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2842
2852
  });
2843
2853
  return (_ctx, _cache) => {
2844
2854
  const _component_ASpin = Spin;
2845
- return openBlock(), createBlock(Modal, mergeProps(unref$1(getBindValue), { onCancel: handleCancel }), createSlots({
2855
+ return openBlock(), createBlock(Modal, mergeProps(unref(getBindValue), { onCancel: handleCancel }), createSlots({
2846
2856
  default: withCtx(() => [
2847
2857
  createVNode(_component_ASpin, {
2848
- spinning: unref$1(getBindValue).loading,
2849
- tip: unref$1(getBindValue).loadingTip
2858
+ spinning: unref(getBindValue).loading,
2859
+ tip: unref(getBindValue).loadingTip
2850
2860
  }, {
2851
2861
  default: withCtx(() => [
2852
2862
  createVNode(ModalWrapper, mergeProps({
2853
- useWrapper: unref$1(getBindValue).useWrapper,
2854
- fullScreen: unref$1(fullScreenRef),
2863
+ useWrapper: unref(getBindValue).useWrapper,
2864
+ fullScreen: unref(fullScreenRef),
2855
2865
  ref_key: "modalWrapperRef",
2856
2866
  ref: modalWrapperRef,
2857
- minHeight: unref$1(getBindValue).minHeight,
2858
- height: unref$1(getWrapperHeight),
2867
+ minHeight: unref(getBindValue).minHeight,
2868
+ height: unref(getWrapperHeight),
2859
2869
  visible: visibleRef.value,
2860
- modalFooterHeight: unref$1(modalFooterHeight)
2861
- }, unref$1(omit)(unref$1(getBindValue).wrapperProps, "visible", "height", "modalFooterHeight"), { onHeightChange: handleHeightChange }), {
2870
+ modalFooterHeight: unref(modalFooterHeight)
2871
+ }, unref(omit)(unref(getBindValue).wrapperProps, "visible", "height", "modalFooterHeight"), { onHeightChange: handleHeightChange }), {
2862
2872
  default: withCtx(() => [
2863
2873
  renderSlot(_ctx.$slots, "default")
2864
2874
  ]),
@@ -2874,10 +2884,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2874
2884
  name: "closeIcon",
2875
2885
  fn: withCtx(() => [
2876
2886
  createVNode(CloseIcon, {
2877
- canFullscreen: unref$1(getBindValue).canFullscreen,
2878
- fullScreen: unref$1(fullScreenRef),
2887
+ canFullscreen: unref(getBindValue).canFullscreen,
2888
+ fullScreen: unref(fullScreenRef),
2879
2889
  onCancel: handleCancel,
2880
- onFullscreen: unref$1(toggleFullScreen)
2890
+ onFullscreen: unref(toggleFullScreen)
2881
2891
  }, null, 8, ["canFullscreen", "fullScreen", "onFullscreen"])
2882
2892
  ]),
2883
2893
  key: "0"
@@ -2885,7 +2895,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2885
2895
  !_ctx.$slots.title ? {
2886
2896
  name: "title",
2887
2897
  fn: withCtx(() => [
2888
- createTextVNode(toDisplayString(unref$1(getMergeProps).title), 1)
2898
+ createTextVNode(toDisplayString(unref(getMergeProps).title), 1)
2889
2899
  ]),
2890
2900
  key: "1"
2891
2901
  } : void 0,
@@ -2894,10 +2904,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2894
2904
  fn: withCtx(() => [
2895
2905
  createVNode(ModalFooter, {
2896
2906
  buttons: propsRef.value?.footer,
2897
- showSave: unref$1(getBindValue).showOkBtn,
2898
- showCancel: unref$1(getBindValue).showCancelBtn,
2899
- okText: unref$1(getBindValue).okText,
2900
- cancelText: unref$1(getBindValue).cancelText,
2907
+ showSave: unref(getBindValue).showOkBtn,
2908
+ showCancel: unref(getBindValue).showCancelBtn,
2909
+ okText: unref(getBindValue).okText,
2910
+ cancelText: unref(getBindValue).cancelText,
2901
2911
  onHandleSave: handleSave,
2902
2912
  onHandleCancel: handleCancel
2903
2913
  }, createSlots({ _: 2 }, [
@@ -2913,7 +2923,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2913
2923
  ]),
2914
2924
  key: "2"
2915
2925
  } : void 0,
2916
- renderList(Object.keys(unref$1(omit)(_ctx.$slots, "default")), (item) => {
2926
+ renderList(Object.keys(unref(omit)(_ctx.$slots, "default")), (item) => {
2917
2927
  return {
2918
2928
  name: item,
2919
2929
  fn: withCtx((data) => [
@@ -2986,7 +2996,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2986
2996
  setup(__props) {
2987
2997
  const props = __props;
2988
2998
  const [registerDialog] = useModal({
2989
- ...omit(toRaw$1(props), [
2999
+ ...omit(toRaw(props), [
2990
3000
  "curd",
2991
3001
  "formProps",
2992
3002
  "schemas"
@@ -2997,8 +3007,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2997
3007
  props?.onSave();
2998
3008
  }
2999
3009
  return (_ctx, _cache) => {
3000
- return openBlock(), createBlock(unref$1(DtModal$1), {
3001
- onRegister: unref$1(registerDialog),
3010
+ return openBlock(), createBlock(unref(DtModal$1), {
3011
+ onRegister: unref(registerDialog),
3002
3012
  onSave: _cache[0] || (_cache[0] = ($event) => handleSave())
3003
3013
  }, {
3004
3014
  default: withCtx(() => [