@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
@@ -7709,7 +7709,7 @@ declare const DtDrawer: import('../../utils/withInstall').SFCWithInstall<import(
7709
7709
  cancelText?: string;
7710
7710
  footer?: {
7711
7711
  t?: string;
7712
- name: string;
7712
+ label: string;
7713
7713
  color?: "" | "error" | "warning" | "success";
7714
7714
  type?: "default" | "link" | "dashed" | "text" | "primary" | "ghost";
7715
7715
  class?: string;
@@ -1,6 +1,6 @@
1
1
  import { Button, FormItem, Col, Drawer } from "ant-design-vue/es";
2
2
  import "ant-design-vue/es/drawer/style";
3
- import { defineComponent, getCurrentInstance as getCurrentInstance$1, ref as ref$1, inject, computed, onUnmounted, h as h$1, provide, onMounted, nextTick as nextTick$1, unref, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, createBlock, resolveDynamicComponent, withCtx, renderSlot, createVNode, mergeProps, toDisplayString, watch, resolveDirective, normalizeProps, Fragment, renderList, withDirectives, createCommentVNode, createTextVNode, useAttrs, createSlots, guardReactiveProps, reactive, toRaw as toRaw$1 } from "vue";
3
+ import { defineComponent, getCurrentInstance, ref, inject, computed, onUnmounted, h, provide, onMounted, nextTick as nextTick$1, unref, onBeforeUnmount, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, createBlock, resolveDynamicComponent, withCtx, renderSlot, createVNode, mergeProps, toDisplayString, watch, resolveDirective, normalizeProps, Fragment, renderList, withDirectives, createCommentVNode, createTextVNode, useAttrs, toRaw, createSlots, guardReactiveProps, reactive, watchEffect } from "vue";
4
4
  import { off, on, useI18n, dispatchResize, isFunction, DtCache, CacheKey, deepMerge, isUnDef, useApp, isObject, error } from "@dt-frames/core";
5
5
  import "ant-design-vue/es/col/style";
6
6
  import "ant-design-vue/es/form/style";
@@ -73,14 +73,14 @@ const Bar = defineComponent({
73
73
  move: Number
74
74
  },
75
75
  setup(props) {
76
- const instance = getCurrentInstance$1();
77
- const thumb = ref$1();
76
+ const instance = getCurrentInstance();
77
+ const thumb = ref();
78
78
  const wrap = inject("scroll-bar-wrap", {});
79
79
  const bar = computed(() => {
80
80
  return BAR_MAP[props.vertical ? "vertical" : "horizontal"];
81
81
  });
82
- const barStore = ref$1({});
83
- const cursorDown = ref$1();
82
+ const barStore = ref({});
83
+ const cursorDown = ref();
84
84
  const clickThumbHandler = (e) => {
85
85
  if (e.ctrlKey || e.button === 2) {
86
86
  return;
@@ -124,13 +124,13 @@ const Bar = defineComponent({
124
124
  onUnmounted(() => {
125
125
  off(document, "mouseup", mouseUpDocumentHandler);
126
126
  });
127
- return () => h$1(
127
+ return () => h(
128
128
  "div",
129
129
  {
130
130
  class: ["scrollbar__bar", "is-" + bar.value.key],
131
131
  onMousedown: clickTrackHandler
132
132
  },
133
- h$1("div", {
133
+ h("div", {
134
134
  ref: thumb,
135
135
  class: "scrollbar__thumb",
136
136
  onMousedown: clickThumbHandler,
@@ -168,12 +168,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
168
168
  },
169
169
  setup(__props) {
170
170
  const props = __props;
171
- const sizeWidth = ref$1("0");
172
- const sizeHeight = ref$1("0");
173
- const moveX = ref$1(0);
174
- const moveY = ref$1(0);
175
- const wrap = ref$1();
176
- const resize = ref$1();
171
+ const sizeWidth = ref("0");
172
+ const sizeHeight = ref("0");
173
+ const moveX = ref(0);
174
+ const moveY = ref(0);
175
+ const wrap = ref();
176
+ const resize = ref();
177
177
  provide("scroll-bar-wrap", wrap);
178
178
  const style = computed(() => {
179
179
  let rsStyle = {};
@@ -354,7 +354,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
354
354
  setup(__props, { emit: emits }) {
355
355
  const props = __props;
356
356
  const { t } = useI18n();
357
- const advancedRef = ref$1(props.isAdvanced);
357
+ const advancedRef = ref(props.isAdvanced);
358
358
  let key = 0;
359
359
  const showAdvanceRef = computed(() => {
360
360
  return props.mode === "search" ? props.showAdvancedButton : false;
@@ -423,7 +423,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
423
423
  (button.show === void 0 ? true : button.show) ? withDirectives((openBlock(), createBlock(_component_AButton, {
424
424
  type: button.type,
425
425
  class: normalizeClass(button.class),
426
- loading: button.loading?.value,
426
+ loading: button.loading,
427
427
  disabled: button.disabled,
428
428
  key: unref(key),
429
429
  onClick: ($event) => handleBtnClick(button)
@@ -434,7 +434,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
434
434
  ]) : createCommentVNode("", true)
435
435
  ]),
436
436
  default: withCtx(() => [
437
- createTextVNode(" " + toDisplayString(unref(t)(button.name)) + " ", 1),
437
+ createTextVNode(" " + toDisplayString(unref(t)(button.label)) + " ", 1),
438
438
  button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2, null, 512)), [
439
439
  [_directive_icon, button.postIcon]
440
440
  ]) : createCommentVNode("", true)
@@ -492,8 +492,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
492
492
  if (props.buttons && props.buttons.length)
493
493
  return props.buttons;
494
494
  let buttonActions = [
495
- { t: "\u4FDD\u5B58", name: props.okText || t("SAVE"), preIcon: "mdi:content-save", type: "primary", flag: "OK" },
496
- { t: "\u5173\u95ED", name: props.cancelText || t("CLOSE"), preIcon: "mdi:close", flag: "CANCEL" }
495
+ { t: "\u4FDD\u5B58", label: props.okText || t("SAVE"), preIcon: "mdi:content-save", type: "primary", flag: "OK" },
496
+ { t: "\u5173\u95ED", label: props.cancelText || t("CLOSE"), preIcon: "mdi:close", flag: "CANCEL" }
497
497
  ];
498
498
  if (!props.showSave)
499
499
  buttonActions = buttonActions.filter((btn) => btn.flag !== "OK");
@@ -572,9 +572,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
572
572
  setup(__props, { emit: emits }) {
573
573
  const props = __props;
574
574
  const attrs = useAttrs();
575
- const propsRef = ref$1(null);
575
+ const propsRef = ref(null);
576
576
  const auths = DtCache.getLocal(CacheKey.AUTHS);
577
- const visibleRef = ref$1(false);
577
+ const visibleRef = ref(false);
578
578
  const getMergeProps = computed(() => {
579
579
  return deepMerge(toRaw(props), unref(propsRef));
580
580
  });
@@ -728,9 +728,9 @@ const orgDialogProp = reactive({});
728
728
  const cbTransfer = reactive({});
729
729
  const dataTransfer = reactive({});
730
730
  function useDrawerOut() {
731
- const drawer = ref$1(null);
732
- const loaded = ref$1(false);
733
- const uid = ref$1("");
731
+ const drawer = ref(null);
732
+ const loaded = ref(false);
733
+ const uid = ref("");
734
734
  const { isProd } = useApp();
735
735
  function register(drawerMethods, uuid) {
736
736
  if (!getCurrentInstance()) {
@@ -765,7 +765,7 @@ function useDrawerOut() {
765
765
  },
766
766
  openDrawer: (params = null, afterClose) => {
767
767
  const id = unref(uid);
768
- dataTransfer[id] = isObject(params) ? { ...toRaw$1(params) } : params;
768
+ dataTransfer[id] = isObject(params) ? { ...toRaw(params) } : params;
769
769
  getInstance()?.setDrawerProps({
770
770
  defaultFullscreen: false,
771
771
  ...orgDialogProp[id],
@@ -784,9 +784,9 @@ function useDrawerOut() {
784
784
  return [register, methods];
785
785
  }
786
786
  function useDrawer(props, setModalData) {
787
- const drawerInstanceRef = ref$1(null);
787
+ const drawerInstanceRef = ref(null);
788
788
  const currentInstance = getCurrentInstance();
789
- const uidRef = ref$1("");
789
+ const uidRef = ref("");
790
790
  const { isProd } = useApp();
791
791
  const getInstance = () => {
792
792
  const instance = unref(drawerInstanceRef);
@@ -802,7 +802,7 @@ function useDrawer(props, setModalData) {
802
802
  uidRef.value = uuid;
803
803
  drawerInstanceRef.value = drawerInstance;
804
804
  currentInstance?.emit("register", drawerInstance, uuid);
805
- orgDialogProp[uuid] = toRaw$1(props);
805
+ orgDialogProp[uuid] = toRaw(props);
806
806
  drawerInstance.setDrawerProps(props);
807
807
  }
808
808
  watchEffect(() => {
@@ -1,4 +1,3 @@
1
- import { Recordable } from '@dt-frames/core';
2
1
  import { DrawerMethods, DrawerProps } from './types/index.type';
3
2
  import { CSSProperties } from 'vue';
4
3
  declare const _sfc_main: import("vue").DefineComponent<{
@@ -7711,7 +7710,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
7711
7710
  cancelText?: string;
7712
7711
  footer?: {
7713
7712
  t?: string;
7714
- name: string;
7713
+ label: string;
7715
7714
  color?: "" | "error" | "warning" | "success";
7716
7715
  type?: "default" | "link" | "dashed" | "text" | "primary" | "ghost";
7717
7716
  class?: string;
@@ -7895,7 +7894,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
7895
7894
  key: number;
7896
7895
  showAdvanceRef: import("vue").ComputedRef<boolean>;
7897
7896
  colOpt: import("vue").ComputedRef<{
7898
- style: Recordable<any>;
7897
+ style: import("@dt-frames/core").Recordable<any>;
7899
7898
  }>;
7900
7899
  getAdvanceClass: import("vue").ComputedRef<(string | {
7901
7900
  'basic-arrow--active': boolean;
@@ -13,7 +13,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
13
13
  default: () => {};
14
14
  };
15
15
  layout: {
16
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
16
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
17
17
  default: string;
18
18
  };
19
19
  labelWidth: {
@@ -57,7 +57,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
57
57
  default: () => {};
58
58
  };
59
59
  size: {
60
- type: import("vue").PropType<"small" | "middle" | "large">;
60
+ type: import("vue").PropType<"middle" | "small" | "large">;
61
61
  default: string;
62
62
  };
63
63
  disabled: {
@@ -149,7 +149,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
149
149
  default: () => {};
150
150
  };
151
151
  layout: {
152
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
152
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
153
153
  default: string;
154
154
  };
155
155
  labelWidth: {
@@ -193,7 +193,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
193
193
  default: () => {};
194
194
  };
195
195
  size: {
196
- type: import("vue").PropType<"small" | "middle" | "large">;
196
+ type: import("vue").PropType<"middle" | "small" | "large">;
197
197
  default: string;
198
198
  };
199
199
  disabled: {
@@ -291,7 +291,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
291
291
  default: () => {};
292
292
  };
293
293
  layout: {
294
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
294
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
295
295
  default: string;
296
296
  };
297
297
  labelWidth: {
@@ -335,7 +335,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
335
335
  default: () => {};
336
336
  };
337
337
  size: {
338
- type: import("vue").PropType<"small" | "middle" | "large">;
338
+ type: import("vue").PropType<"middle" | "small" | "large">;
339
339
  default: string;
340
340
  };
341
341
  disabled: {
@@ -2191,8 +2191,8 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2191
2191
  validator?: (rule: import("ant-design-vue/lib/form").RuleObject, value: any, callback: (error?: string) => void) => void | Promise<void>;
2192
2192
  } | any;
2193
2193
  required?: boolean;
2194
- validator?: (rule: import("ant-design-vue/lib/form").RuleObject, value: any, callback: (error?: string) => void) => void | Promise<void>;
2195
2194
  trigger?: "blur" | "change" | ("blur" | "change")[];
2195
+ validator?: (rule: import("ant-design-vue/lib/form").RuleObject, value: any, callback: (error?: string) => void) => void | Promise<void>;
2196
2196
  transform?: (value: any) => any;
2197
2197
  warningOnly?: boolean;
2198
2198
  message?: (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -2230,7 +2230,6 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2230
2230
  validateTrigger?: string | string[];
2231
2231
  };
2232
2232
  required?: boolean;
2233
- validator?: (rule: import("ant-design-vue/lib/form").RuleObject, value: any, callback: (error?: string) => void) => void | Promise<void>;
2234
2233
  trigger?: "blur" | "change" | ("blur" & ["change", "blur"]) | ("change" & ["change", "blur"]) | (("blur" | "change")[] & "blur") | (("blur" | "change")[] & "change") | {
2235
2234
  [x: number]: "blur" | "change";
2236
2235
  length: 2;
@@ -2302,6 +2301,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2302
2301
  0: "change";
2303
2302
  1: "blur";
2304
2303
  };
2304
+ validator?: (rule: import("ant-design-vue/lib/form").RuleObject, value: any, callback: (error?: string) => void) => void | Promise<void>;
2305
2305
  transform?: (value: any) => any;
2306
2306
  warningOnly?: boolean;
2307
2307
  message?: (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -2406,7 +2406,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2406
2406
  default: () => {};
2407
2407
  };
2408
2408
  layout: {
2409
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
2409
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
2410
2410
  default: string;
2411
2411
  };
2412
2412
  labelWidth: {
@@ -2450,7 +2450,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2450
2450
  default: () => {};
2451
2451
  };
2452
2452
  size: {
2453
- type: import("vue").PropType<"small" | "middle" | "large">;
2453
+ type: import("vue").PropType<"middle" | "small" | "large">;
2454
2454
  default: string;
2455
2455
  };
2456
2456
  disabled: {
@@ -2540,7 +2540,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2540
2540
  default: () => {};
2541
2541
  };
2542
2542
  layout: {
2543
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
2543
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
2544
2544
  default: string;
2545
2545
  };
2546
2546
  labelWidth: {
@@ -2584,7 +2584,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2584
2584
  default: () => {};
2585
2585
  };
2586
2586
  size: {
2587
- type: import("vue").PropType<"small" | "middle" | "large">;
2587
+ type: import("vue").PropType<"middle" | "small" | "large">;
2588
2588
  default: string;
2589
2589
  };
2590
2590
  disabled: {
@@ -2684,7 +2684,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2684
2684
  default: () => {};
2685
2685
  };
2686
2686
  layout: {
2687
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
2687
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
2688
2688
  default: string;
2689
2689
  };
2690
2690
  labelWidth: {
@@ -2728,7 +2728,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2728
2728
  default: () => {};
2729
2729
  };
2730
2730
  size: {
2731
- type: import("vue").PropType<"small" | "middle" | "large">;
2731
+ type: import("vue").PropType<"middle" | "small" | "large">;
2732
2732
  default: string;
2733
2733
  };
2734
2734
  disabled: {
@@ -2835,7 +2835,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2835
2835
  default: () => {};
2836
2836
  };
2837
2837
  layout: {
2838
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
2838
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
2839
2839
  default: string;
2840
2840
  };
2841
2841
  labelWidth: {
@@ -2879,7 +2879,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
2879
2879
  default: () => {};
2880
2880
  };
2881
2881
  size: {
2882
- type: import("vue").PropType<"small" | "middle" | "large">;
2882
+ type: import("vue").PropType<"middle" | "small" | "large">;
2883
2883
  default: string;
2884
2884
  };
2885
2885
  disabled: {
@@ -3070,7 +3070,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
3070
3070
  default: () => {};
3071
3071
  };
3072
3072
  layout: {
3073
- type: import("vue").PropType<"vertical" | "horizontal" | "inline">;
3073
+ type: import("vue").PropType<"vertical" | "inline" | "horizontal">;
3074
3074
  default: string;
3075
3075
  };
3076
3076
  labelWidth: {
@@ -3114,7 +3114,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
3114
3114
  default: () => {};
3115
3115
  };
3116
3116
  size: {
3117
- type: import("vue").PropType<"small" | "middle" | "large">;
3117
+ type: import("vue").PropType<"middle" | "small" | "large">;
3118
3118
  default: string;
3119
3119
  };
3120
3120
  disabled: {
@@ -3187,11 +3187,10 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
3187
3187
  }>> & {
3188
3188
  onRegister?: (...args: any[]) => any;
3189
3189
  }, {
3190
- size: "small" | "middle" | "large";
3191
3190
  mode: "search" | "dialog";
3192
3191
  autoFetch: boolean;
3193
3192
  model: {};
3194
- layout: "vertical" | "horizontal" | "inline";
3193
+ layout: "vertical" | "inline" | "horizontal";
3195
3194
  labelWidth: string | number;
3196
3195
  enLabelWidth: string | number;
3197
3196
  labelAlign: "left" | "right";
@@ -3199,6 +3198,7 @@ declare const DtForm: import('../../utils/withInstall').SFCWithInstall<import("v
3199
3198
  wrapperCol: {};
3200
3199
  rowProps: {};
3201
3200
  colProps: {};
3201
+ size: "middle" | "small" | "large";
3202
3202
  disabled: boolean;
3203
3203
  compact: boolean;
3204
3204
  schemas: import("./src/types/form.type").FormSchema[];