@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
@@ -4,7 +4,7 @@ import "ant-design-vue/es/form/style";
4
4
  import "ant-design-vue/es/row/style";
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, useApp, off, on, windowResizeFn, useMessage } from "@dt-frames/core";
6
6
  import { cloneDeep, isEqual, omit, upperFirst, uniqBy, set } from "lodash-es";
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
+ import { Input, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Tooltip, Form, FormItem, Modal } from "ant-design-vue";
8
8
  import { defineStore } from "pinia";
9
9
  import "ant-design-vue/es/radio/style";
10
10
  import "ant-design-vue/es/cascader/style";
@@ -50,7 +50,6 @@ var UiSize = /* @__PURE__ */ ((UiSize2) => {
50
50
  return UiSize2;
51
51
  })(UiSize || {});
52
52
  const defaultThemeConf = {
53
- cache: false,
54
53
  content: {
55
54
  contentMode: ContentMode.FULL
56
55
  },
@@ -132,7 +131,8 @@ const useThemeStore = defineStore({
132
131
  },
133
132
  actions: {
134
133
  setThemeConf(options = {}) {
135
- this.themeConf = deepMerge(this.themeConf, options);
134
+ let newThemeConf = deepMerge(this.themeConf, options);
135
+ this.themeConf = deepMerge(defaultThemeConf, newThemeConf);
136
136
  DtCache.setLocal(CacheKey.THEME, this.themeConf);
137
137
  },
138
138
  setMixSiderIsHasMenu(val) {
@@ -152,7 +152,7 @@ defineStore({
152
152
  id: "route-reuse",
153
153
  state: () => ({
154
154
  cacheTabList: /* @__PURE__ */ new Set(),
155
- tabList: DtCache.getLocal(CacheKey.THEME)?.routeReuse?.cache ? DtCache.getLocal(CacheKey.ROUTE_REUSE) || [] : [],
155
+ tabList: DtCache.getLocal(CacheKey.ROUTE_REUSE) || [],
156
156
  lastDragEndIndex: 0
157
157
  }),
158
158
  getters: {
@@ -633,14 +633,6 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
633
633
  };
634
634
  }
635
635
  });
636
- const _export_sfc = (sfc, props) => {
637
- const target = sfc.__vccOpts || sfc;
638
- for (const [key, val] of props) {
639
- target[key] = val;
640
- }
641
- return target;
642
- };
643
- const RadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/radioButton.vue"]]);
644
636
  const _hoisted_1$2 = { class: "input-with-dialog" };
645
637
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
646
638
  __name: "formInputUseDialog",
@@ -676,15 +668,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
676
668
  key: 0,
677
669
  class: "i mdi:close-circle",
678
670
  onClick: clearProps
679
- })) : createCommentVNode("v-if", true)
671
+ })) : createCommentVNode("", true)
680
672
  ]);
681
673
  };
682
674
  }
683
675
  });
684
- const DtFormInputDialog = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/formInputUseDialog.vue"]]);
685
676
  const components = {
686
677
  Input,
687
- InputWithDialog: DtFormInputDialog,
678
+ InputWithDialog: _sfc_main$c,
688
679
  InputTextArea: Input.TextArea,
689
680
  InputSearch: Input.Search,
690
681
  InputGroup: Input.Group,
@@ -693,7 +684,7 @@ const components = {
693
684
  TreeSelect,
694
685
  Radio,
695
686
  RadioGroup: Radio.Group,
696
- RadioButtonGroup,
687
+ RadioButtonGroup: _sfc_main$d,
697
688
  Checkbox,
698
689
  CheckboxGroup: Checkbox.Group,
699
690
  AutoComplete,
@@ -939,9 +930,15 @@ const _sfc_main$b = {
939
930
  _disabled = disabled(unref(getValues).model);
940
931
  return _disabled;
941
932
  });
933
+ const getSize = () => {
934
+ if (component === "Switch" && unref(getUiSize) === UiSize.LARGE) {
935
+ return "default";
936
+ }
937
+ return unref(getUiSize) === UiSize.MIDDLE ? "default" : unref(getUiSize);
938
+ };
942
939
  const itemProps = {
943
940
  allowClear: _sProps?.allowClear ?? appConf.ui.form.allowClear,
944
- size: unref(getUiSize) === UiSize.MIDDLE ? "default" : unref(getUiSize),
941
+ size: getSize(),
945
942
  ...unref(getComponentProps),
946
943
  disabled: unref(getDisable)
947
944
  };
@@ -1078,7 +1075,6 @@ const _sfc_main$b = {
1078
1075
  };
1079
1076
  }
1080
1077
  };
1081
- const DtFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/FormItem.vue"]]);
1082
1078
  const _hoisted_1$1 = {
1083
1079
  key: 0,
1084
1080
  className: "preIcon pr-1"
@@ -1201,18 +1197,18 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1201
1197
  icon: withCtx(() => [
1202
1198
  button.preIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$1, null, 512)), [
1203
1199
  [_directive_icon, button.preIcon]
1204
- ]) : createCommentVNode("v-if", true)
1200
+ ]) : createCommentVNode("", true)
1205
1201
  ]),
1206
1202
  default: withCtx(() => [
1207
1203
  createTextVNode(" " + toDisplayString(unref(t)(button.label)) + " ", 1),
1208
1204
  button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2, null, 512)), [
1209
1205
  [_directive_icon, button.postIcon]
1210
- ]) : createCommentVNode("v-if", true)
1206
+ ]) : createCommentVNode("", true)
1211
1207
  ]),
1212
1208
  _: 2
1213
1209
  }, 1032, ["type", "class", "loading", "disabled", "onClick"])), [
1214
1210
  [_directive_auth, button.auth]
1215
- ]) : createCommentVNode("v-if", true)
1211
+ ]) : createCommentVNode("", true)
1216
1212
  ], 64);
1217
1213
  }), 256)),
1218
1214
  unref(showAdvanceRef) ? (openBlock(), createBlock(_component_AButton, {
@@ -1222,24 +1218,22 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1222
1218
  onClick: toggleAdvanced
1223
1219
  }, {
1224
1220
  default: withCtx(() => [
1225
- createCommentVNode(" \u6536\u8D77 | \u5C55\u5F00 "),
1226
1221
  createElementVNode("span", _hoisted_3, toDisplayString(advancedRef.value ? unref(t)("UI.ADVANCED") : unref(t)("UI.EXPAND")), 1),
1227
1222
  createElementVNode("span", {
1228
1223
  class: normalizeClass(unref(getAdvanceClass))
1229
1224
  }, _hoisted_5, 2)
1230
1225
  ]),
1231
1226
  _: 1
1232
- })) : createCommentVNode("v-if", true)
1227
+ })) : createCommentVNode("", true)
1233
1228
  ]),
1234
1229
  _: 1
1235
1230
  }, 8, ["style"])
1236
1231
  ]),
1237
1232
  _: 1
1238
- }, 16)) : createCommentVNode("v-if", true);
1233
+ }, 16)) : createCommentVNode("", true);
1239
1234
  };
1240
1235
  }
1241
1236
  });
1242
- const DtFormButtons = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/FormButtons.vue"]]);
1243
1237
  const SEARCH_BTN_NAME = "UI.SEARCH";
1244
1238
  const RESET_BTN_NAME = "UI.RESET";
1245
1239
  const SEARCH_BTNS = [
@@ -1649,10 +1643,7 @@ const BasicProps = {
1649
1643
  loading: {
1650
1644
  type: Object,
1651
1645
  default: () => {
1652
- return {
1653
- onSearch: ref(false),
1654
- onReset: ref(false)
1655
- };
1646
+ return {};
1656
1647
  }
1657
1648
  },
1658
1649
  onSearch: {
@@ -1863,7 +1854,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1863
1854
  } }), {
1864
1855
  default: withCtx(() => [
1865
1856
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSchema), (schema) => {
1866
- return openBlock(), createBlock(unref(DtFormItem), {
1857
+ return openBlock(), createBlock(unref(_sfc_main$b), {
1867
1858
  key: schema.name,
1868
1859
  schema,
1869
1860
  formProps: unref(getProps),
@@ -1882,7 +1873,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1882
1873
  })
1883
1874
  ]), 1032, ["schema", "formProps", "formModel", "defaultValues"]);
1884
1875
  }), 128)),
1885
- unref(getActionsProps).buttonList?.length ? (openBlock(), createBlock(unref(DtFormButtons), mergeProps({ key: 0 }, unref(getActionsProps), { onHandleMethod: unref(handleMethod) }), null, 16, ["onHandleMethod"])) : createCommentVNode("v-if", true)
1876
+ unref(getActionsProps).buttonList?.length ? (openBlock(), createBlock(unref(_sfc_main$a), mergeProps({ key: 0 }, unref(getActionsProps), { onHandleMethod: unref(handleMethod) }), null, 16, ["onHandleMethod"])) : createCommentVNode("", true)
1886
1877
  ]),
1887
1878
  _: 3
1888
1879
  }, 16)
@@ -1892,7 +1883,6 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1892
1883
  };
1893
1884
  }
1894
1885
  });
1895
- 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"]]);
1896
1886
  function useForm(props) {
1897
1887
  const formRef = ref(null);
1898
1888
  const loadedRef = ref(false);
@@ -1969,7 +1959,7 @@ const withInstall = (comp) => {
1969
1959
  };
1970
1960
  return comp;
1971
1961
  };
1972
- const DtForm = withInstall(Forms);
1962
+ const DtForm = withInstall(_sfc_main$9);
1973
1963
  const orgDialogProp = reactive({});
1974
1964
  const cbTransfer = reactive({});
1975
1965
  const dataTransfer = reactive({});
@@ -2057,8 +2047,6 @@ function useModal(props, setModalData) {
2057
2047
  };
2058
2048
  watchEffect(() => {
2059
2049
  const data = dataTransfer[unref(uidRef)];
2060
- if (!data)
2061
- return;
2062
2050
  if (!setModalData || !isFunction(setModalData))
2063
2051
  return;
2064
2052
  nextTick(() => {
@@ -2273,13 +2261,12 @@ const _sfc_main$8 = {
2273
2261
  };
2274
2262
  if (!propsData?.visible)
2275
2263
  return null;
2276
- return createVNode(Modal$1, propsData, _isSlot(_slot = extendSlots(slots)) ? _slot : {
2264
+ return createVNode(Modal, propsData, _isSlot(_slot = extendSlots(slots)) ? _slot : {
2277
2265
  default: () => [_slot]
2278
2266
  });
2279
2267
  };
2280
2268
  }
2281
2269
  };
2282
- 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"]]);
2283
2270
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2284
2271
  __name: "CloseIcon",
2285
2272
  props: {
@@ -2338,7 +2325,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2338
2325
  ]),
2339
2326
  _: 1
2340
2327
  }, 8, ["title"]))
2341
- ], 64)) : createCommentVNode("v-if", true),
2328
+ ], 64)) : createCommentVNode("", true),
2342
2329
  createElementVNode("i", {
2343
2330
  class: "i mdi:close h-14 w-10 pr-4",
2344
2331
  onClick: handleCancel
@@ -2347,7 +2334,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2347
2334
  };
2348
2335
  }
2349
2336
  });
2350
- const CloseIcon = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/components/CloseIcon.vue"]]);
2351
2337
  const isServer = typeof window === "undefined";
2352
2338
  const BAR_MAP = {
2353
2339
  vertical: {
@@ -2589,13 +2575,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2589
2575
  };
2590
2576
  }
2591
2577
  });
2592
- const ScrollBar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/container/src/components/scroll-bar.vue"]]);
2593
2578
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2594
2579
  __name: "scroll-container",
2595
2580
  setup(__props) {
2596
2581
  const scrollbarRef = ref(null);
2597
2582
  return (_ctx, _cache) => {
2598
- return openBlock(), createBlock(ScrollBar, mergeProps({
2583
+ return openBlock(), createBlock(_sfc_main$6, mergeProps({
2599
2584
  ref_key: "scrollbarRef",
2600
2585
  ref: scrollbarRef
2601
2586
  }, _ctx.$attrs, { class: "w-full h-full" }), {
@@ -2607,7 +2592,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2607
2592
  };
2608
2593
  }
2609
2594
  });
2610
- const ScrollContainer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/container/src/scroll-container.vue"]]);
2611
2595
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2612
2596
  __name: "slot-container",
2613
2597
  props: {
@@ -2626,9 +2610,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2626
2610
  };
2627
2611
  }
2628
2612
  });
2629
- const SlotContainer = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/container/src/slot-container.vue"]]);
2630
- const DtScrollContainer = withInstall(ScrollContainer);
2631
- withInstall(SlotContainer);
2613
+ const DtScrollContainer = withInstall(_sfc_main$5);
2614
+ withInstall(_sfc_main$4);
2632
2615
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2633
2616
  __name: "ModalWrap",
2634
2617
  props: {
@@ -2735,7 +2718,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2735
2718
  };
2736
2719
  }
2737
2720
  });
2738
- const ModalWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/components/ModalWrap.vue"]]);
2739
2721
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2740
2722
  __name: "ModalFooter",
2741
2723
  props: {
@@ -2756,8 +2738,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2756
2738
  if (props.buttons && props.buttons.length)
2757
2739
  return props.buttons;
2758
2740
  let buttonActions = [
2759
- { t: "\u4FDD\u5B58", label: props.okText || t("SAVE"), preIcon: "mdi:content-save", type: "primary", flag: "OK" },
2760
- { t: "\u5173\u95ED", label: props.cancelText || t("CLOSE"), preIcon: "mdi:close", flag: "CANCEL" }
2741
+ { t: "\u5173\u95ED", label: props.cancelText || t("CLOSE"), preIcon: "mdi:close", flag: "CANCEL" },
2742
+ { t: "\u4FDD\u5B58", label: props.okText || t("SAVE"), preIcon: "mdi:content-save", type: "primary", flag: "OK" }
2761
2743
  ];
2762
2744
  if (!props.showSave)
2763
2745
  buttonActions = buttonActions.filter((btn) => btn.flag !== "OK");
@@ -2778,7 +2760,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2778
2760
  return (_ctx, _cache) => {
2779
2761
  return openBlock(), createElementBlock(Fragment, null, [
2780
2762
  renderSlot(_ctx.$slots, "appendFooter"),
2781
- createVNode(DtFormButtons, {
2763
+ createVNode(_sfc_main$a, {
2782
2764
  mode: "dialog",
2783
2765
  buttonList: unref(buttonList),
2784
2766
  onHandleMethod: _cache[0] || (_cache[0] = ($event) => handleMethod($event))
@@ -2787,7 +2769,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2787
2769
  };
2788
2770
  }
2789
2771
  });
2790
- 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"]]);
2791
2772
  function useFullScreen(wrapClassName) {
2792
2773
  const fullScreenRef = ref(false);
2793
2774
  const getWrapClassName = computed(() => {
@@ -2906,14 +2887,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2906
2887
  });
2907
2888
  return (_ctx, _cache) => {
2908
2889
  const _component_ASpin = Spin;
2909
- return openBlock(), createBlock(Modal, mergeProps(unref(getBindValue), { onCancel: handleCancel }), createSlots({
2890
+ return openBlock(), createBlock(_sfc_main$8, mergeProps(unref(getBindValue), { onCancel: handleCancel }), createSlots({
2910
2891
  default: withCtx(() => [
2911
2892
  createVNode(_component_ASpin, {
2912
2893
  spinning: unref(getBindValue).loading,
2913
2894
  tip: unref(getBindValue).loadingTip
2914
2895
  }, {
2915
2896
  default: withCtx(() => [
2916
- createVNode(ModalWrapper, mergeProps({
2897
+ createVNode(_sfc_main$3, mergeProps({
2917
2898
  useWrapper: unref(getBindValue).useWrapper,
2918
2899
  fullScreen: unref(fullScreenRef),
2919
2900
  ref_key: "modalWrapperRef",
@@ -2937,7 +2918,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2937
2918
  !_ctx.$slots.closeIcon ? {
2938
2919
  name: "closeIcon",
2939
2920
  fn: withCtx(() => [
2940
- createVNode(CloseIcon, {
2921
+ createVNode(_sfc_main$7, {
2941
2922
  canFullscreen: unref(getBindValue).canFullscreen,
2942
2923
  fullScreen: unref(fullScreenRef),
2943
2924
  onCancel: handleCancel,
@@ -2956,7 +2937,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2956
2937
  !_ctx.$slots.footer ? {
2957
2938
  name: "footer",
2958
2939
  fn: withCtx(() => [
2959
- createVNode(ModalFooter, {
2940
+ createVNode(_sfc_main$2, {
2960
2941
  buttons: propsRef.value?.footer,
2961
2942
  showSave: unref(getBindValue).showOkBtn,
2962
2943
  showCancel: unref(getBindValue).showCancelBtn,
@@ -2989,7 +2970,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2989
2970
  };
2990
2971
  }
2991
2972
  });
2992
- const DtModal$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/modal/src/index.vue"]]);
2993
2973
  const basicProps = {
2994
2974
  title: {
2995
2975
  type: Object
@@ -3062,7 +3042,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3062
3042
  props?.onSave();
3063
3043
  }
3064
3044
  return (_ctx, _cache) => {
3065
- return openBlock(), createBlock(unref(DtModal$1), {
3045
+ return openBlock(), createBlock(unref(_sfc_main$1), {
3066
3046
  onRegister: unref(registerDialog),
3067
3047
  onSave: _cache[0] || (_cache[0] = ($event) => handleSave())
3068
3048
  }, {
@@ -3074,7 +3054,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3074
3054
  };
3075
3055
  }
3076
3056
  });
3077
- const DtModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/curd/src/components/Curd.vue"]]);
3078
3057
  function useCurd(curdOpt) {
3079
3058
  const [register, {
3080
3059
  openModal,
@@ -3102,7 +3081,7 @@ function useCurd(curdOpt) {
3102
3081
  const DtCurdModal = () => {
3103
3082
  return h(createVNode("div", {
3104
3083
  "class": "dt-curd-modal"
3105
- }, [createVNode(DtModal, mergeProps(curdOpt, {
3084
+ }, [createVNode(_sfc_main, mergeProps(curdOpt, {
3106
3085
  "title": title,
3107
3086
  "onRegister": register
3108
3087
  }), {
@@ -3111,13 +3090,11 @@ function useCurd(curdOpt) {
3111
3090
  }, null)]
3112
3091
  })]));
3113
3092
  };
3114
- function add() {
3093
+ function openAddDialog() {
3115
3094
  title.value = t("ADD") + " - " + oriTitle;
3116
3095
  openModal();
3117
3096
  }
3118
- function del({
3119
- row
3120
- }) {
3097
+ function del(row) {
3121
3098
  const {
3122
3099
  primaryKey = "id",
3123
3100
  onDeletes
@@ -3126,9 +3103,7 @@ function useCurd(curdOpt) {
3126
3103
  onDeletes([row[primaryKey]]);
3127
3104
  }
3128
3105
  }
3129
- function update({
3130
- row
3131
- }) {
3106
+ function openUpdateDialog(row) {
3132
3107
  const {
3133
3108
  primaryKey = "id",
3134
3109
  onQueryById
@@ -3166,9 +3141,9 @@ function useCurd(curdOpt) {
3166
3141
  }
3167
3142
  }
3168
3143
  const instance = {
3169
- add,
3144
+ openAddDialog,
3170
3145
  del,
3171
- update,
3146
+ openUpdateDialog,
3172
3147
  dels,
3173
3148
  closeModal,
3174
3149
  setModalProps,
@@ -124,10 +124,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
124
124
  type: import("vue").PropType<{
125
125
  [key: string]: import("vue").Ref<boolean>;
126
126
  }>;
127
- default: () => {
128
- onSearch: import("vue").Ref<boolean>;
129
- onReset: import("vue").Ref<boolean>;
130
- };
127
+ default: () => {};
131
128
  };
132
129
  onSearch: {
133
130
  type: import("vue").PropType<(params: import("@dt-frames/core").Recordable<any>) => void>;
@@ -1172,10 +1169,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
1172
1169
  type: import("vue").PropType<{
1173
1170
  [key: string]: import("vue").Ref<boolean>;
1174
1171
  }>;
1175
- default: () => {
1176
- onSearch: import("vue").Ref<boolean>;
1177
- onReset: import("vue").Ref<boolean>;
1178
- };
1172
+ default: () => {};
1179
1173
  };
1180
1174
  onSearch: {
1181
1175
  type: import("vue").PropType<(params: import("@dt-frames/core").Recordable<any>) => void>;
@@ -2,9 +2,9 @@ import { Recordable } from "@dt-frames/core";
2
2
  import { ExtractPropTypes, PropType } from "vue";
3
3
  import { basicProps } from "../props";
4
4
  export declare function useCurd(curdOpt: Partial<ExtractPropTypes<typeof basicProps>>): {
5
- add: () => void;
6
- del: ({ row }: Recordable) => void;
7
- update: ({ row }: Recordable) => void;
5
+ openAddDialog: () => void;
6
+ del: (row: Recordable) => void;
7
+ openUpdateDialog: (row: Recordable) => void;
8
8
  dels: (ids?: PropType<String | Number>[]) => void;
9
9
  closeModal: () => void;
10
10
  setModalProps: (props: Partial<ExtractPropTypes<{
@@ -129,10 +129,7 @@ export declare const basicProps: {
129
129
  type: PropType<{
130
130
  [key: string]: Ref<boolean>;
131
131
  }>;
132
- default: () => {
133
- onSearch: Ref<boolean>;
134
- onReset: Ref<boolean>;
135
- };
132
+ default: () => {};
136
133
  };
137
134
  onSearch: {
138
135
  type: PropType<(params: import("@dt-frames/core").Recordable<any>) => void>;
@@ -3,16 +3,10 @@ import { basicProps } from '../../../modal/src/props';
3
3
  import { Recordable } from "@dt-frames/core";
4
4
  import { ExtractPropTypes, PropType } from "vue";
5
5
  export declare type CurdActionType = {
6
- add: () => void;
7
- del: (params: {
8
- row: Recordable;
9
- index: Number;
10
- }) => void;
6
+ openAddDialog: () => void;
7
+ del: (row: Recordable) => void;
11
8
  dels: (ids: PropType<String | Number>[]) => void;
12
- update: (params: {
13
- row: Recordable;
14
- index: Number;
15
- }) => void;
9
+ openUpdateDialog: (row: Recordable) => void;
16
10
  closeModal: () => void;
17
11
  setModalProps: (props: Partial<ExtractPropTypes<typeof basicProps>>) => void;
18
12
  curdFormMethods: FormActionType;