@dt-frames/ui 2.0.11 → 2.0.12

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 (43) hide show
  1. package/es/components/container/index.d.ts +2 -93
  2. package/es/components/curd/src/components/Curd.d.ts +6 -2
  3. package/es/components/curd/src/props.d.ts +3 -1
  4. package/es/components/drawer/index.d.ts +1 -1
  5. package/es/components/drawer/index.js +4 -4
  6. package/es/components/drawer/src/index.d.ts +1 -1
  7. package/es/components/drawer/src/types/index.type.d.ts +1 -1
  8. package/es/components/form/index.js +32 -13
  9. package/es/components/form/src/components/FormItem.d.ts +3 -1
  10. package/es/components/form/src/components/formIcon.d.ts +0 -8
  11. package/es/components/form/src/props.d.ts +3 -1
  12. package/es/components/form/src/types/form.type.d.ts +1 -0
  13. package/es/components/form/src/types/items.type.d.ts +6 -4
  14. package/es/components/icons/index.d.ts +497 -497
  15. package/es/components/iframe/index.d.ts +2 -0
  16. package/es/components/iframe/index.js +72 -0
  17. package/es/components/iframe/index.less +29 -0
  18. package/es/components/iframe/src/index.d.ts +38 -0
  19. package/es/components/modal/index.js +11 -6
  20. package/es/components/modal/src/index.d.ts +4 -2
  21. package/es/components/table/index.js +173 -94
  22. package/es/components/tree/index.js +39 -29
  23. package/es/components/upload/index.js +414 -11
  24. package/es/components/upload/index.less +37 -0
  25. package/es/components/upload/src/basicProps.d.ts +89 -0
  26. package/es/components/upload/src/components/PdfView.d.ts +9 -0
  27. package/es/components/upload/src/hooks/useFile.d.ts +15 -0
  28. package/es/components/upload/src/index.d.ts +236 -2
  29. package/es/components/upload/src/type/file.d.ts +10 -0
  30. package/es/components/upload/src/utils/upload.d.ts +2 -0
  31. package/es/theme/index.js +3 -1
  32. package/es/theme/index.less +5 -1
  33. package/es/theme/src/components/content/index.d.ts +2 -0
  34. package/es/theme/src/components/header/index.d.ts +809 -809
  35. package/es/theme/src/components/header/multiple-header.d.ts +918 -918
  36. package/es/theme/src/index.d.ts +2059 -2057
  37. package/index.d.ts +3 -1
  38. package/index.js +3 -1
  39. package/manualContentPath.js +14 -0
  40. package/package.json +4 -2
  41. package/vite.config.ts +3 -0
  42. package/vite.config.ts.timestamp-1678694558071.mjs +0 -59
  43. package/vite.config.ts.timestamp-1678700851971.mjs +0 -61
@@ -1,94 +1,3 @@
1
- declare const DtScrollContainer: import('../../utils/withInstall').SFCWithInstall<import("vue").DefineComponent<{}, {
2
- scrollbarRef: any;
3
- scrollTo: (to: number, duration?: number) => void;
4
- getScrollWrap: () => any;
5
- scrollBottom: () => void;
6
- ScrollBar: import("vue").DefineComponent<{
7
- wrapClass: {
8
- type: (StringConstructor | ArrayConstructor)[];
9
- default: string;
10
- };
11
- wrapStyle: ArrayConstructor;
12
- viewClass: {
13
- type: (StringConstructor | ArrayConstructor)[];
14
- default: string;
15
- };
16
- viewStyle: {
17
- type: (StringConstructor | ArrayConstructor)[];
18
- default: string;
19
- };
20
- noresize: BooleanConstructor;
21
- tag: {
22
- type: StringConstructor;
23
- default: string;
24
- };
25
- }, {
26
- sizeWidth: import("vue").Ref<string>;
27
- sizeHeight: import("vue").Ref<string>;
28
- moveX: import("vue").Ref<number>;
29
- moveY: import("vue").Ref<number>;
30
- wrap: import("vue").Ref<any>;
31
- resize: import("vue").Ref<any>;
32
- props: any;
33
- style: import("vue").ComputedRef<{}>;
34
- handleScroll: () => void;
35
- update: () => void;
36
- readonly Bar: import("vue").DefineComponent<{
37
- vertical: BooleanConstructor;
38
- size: StringConstructor;
39
- move: NumberConstructor;
40
- }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
41
- [key: string]: any;
42
- }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
- vertical: BooleanConstructor;
44
- size: StringConstructor;
45
- move: NumberConstructor;
46
- }>>, {
47
- vertical: boolean;
48
- }>;
49
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
50
- wrapClass: {
51
- type: (StringConstructor | ArrayConstructor)[];
52
- default: string;
53
- };
54
- wrapStyle: ArrayConstructor;
55
- viewClass: {
56
- type: (StringConstructor | ArrayConstructor)[];
57
- default: string;
58
- };
59
- viewStyle: {
60
- type: (StringConstructor | ArrayConstructor)[];
61
- default: string;
62
- };
63
- noresize: BooleanConstructor;
64
- tag: {
65
- type: StringConstructor;
66
- default: string;
67
- };
68
- }>>, {
69
- wrapClass: string | unknown[];
70
- viewClass: string | unknown[];
71
- viewStyle: string | unknown[];
72
- noresize: boolean;
73
- tag: string;
74
- }>;
75
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
76
- declare const DtSlotContainer: import('../../utils/withInstall').SFCWithInstall<import("vue").DefineComponent<{
77
- template: {
78
- type: FunctionConstructor;
79
- };
80
- data: {
81
- type: ObjectConstructor;
82
- };
83
- }, {
84
- props: any;
85
- Container: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
86
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
87
- template: {
88
- type: FunctionConstructor;
89
- };
90
- data: {
91
- type: ObjectConstructor;
92
- };
93
- }>>, {}>>;
1
+ declare const DtScrollContainer: import('../../utils/withInstall').SFCWithInstall<import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
2
+ declare const DtSlotContainer: import('../../utils/withInstall').SFCWithInstall<import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
94
3
  export { DtScrollContainer, DtSlotContainer };
@@ -78,7 +78,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
78
78
  };
79
79
  colProps: {
80
80
  type: import("vue").PropType<Partial<import("../../../form/src/types/form.type").ColEx>>;
81
- default: () => {};
81
+ };
82
+ span: {
83
+ type: NumberConstructor;
82
84
  };
83
85
  size: {
84
86
  type: import("vue").PropType<"middle" | "small" | "large">;
@@ -256,7 +258,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
256
258
  };
257
259
  colProps: {
258
260
  type: import("vue").PropType<Partial<import("../../../form/src/types/form.type").ColEx>>;
259
- default: () => {};
261
+ };
262
+ span: {
263
+ type: NumberConstructor;
260
264
  };
261
265
  size: {
262
266
  type: import("vue").PropType<"middle" | "small" | "large">;
@@ -83,7 +83,9 @@ export declare const basicProps: {
83
83
  };
84
84
  colProps: {
85
85
  type: PropType<Partial<import('../../form/src/types/form.type').ColEx>>;
86
- default: () => {};
86
+ };
87
+ span: {
88
+ type: NumberConstructor;
87
89
  };
88
90
  size: {
89
91
  type: PropType<"middle" | "small" | "large">;
@@ -7723,7 +7723,7 @@ declare const DtDrawer: import('../../utils/withInstall').SFCWithInstall<import(
7723
7723
  onClick?: (args?: any) => any;
7724
7724
  }[];
7725
7725
  afterVisibleChange?: (visible?: boolean) => void;
7726
- getContainer?: () => string | HTMLElement;
7726
+ getContainer?: false | HTMLElement | (() => any);
7727
7727
  closeFunc?: () => Promise<any>;
7728
7728
  afterClose?: Function;
7729
7729
  }>;
@@ -153,16 +153,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
153
153
  visible: unref(visibleRef),
154
154
  bodyStyle: {
155
155
  padding: 0
156
+ },
157
+ style: {
158
+ position: "absolute"
156
159
  }
157
160
  };
158
161
  const { getContainer, width } = opt;
159
- if (!getContainer) {
162
+ if (isUnDef(getContainer)) {
160
163
  opt = {
161
164
  ...opt,
162
165
  getContainer: ".dt-layout-content",
163
- style: {
164
- position: "absolute"
165
- },
166
166
  width: width || "100%"
167
167
  };
168
168
  } else {
@@ -7724,7 +7724,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
7724
7724
  onClick?: (args?: any) => any;
7725
7725
  }[];
7726
7726
  afterVisibleChange?: (visible?: boolean) => void;
7727
- getContainer?: () => string | HTMLElement;
7727
+ getContainer?: false | HTMLElement | (() => any);
7728
7728
  closeFunc?: () => Promise<any>;
7729
7729
  afterClose?: Function;
7730
7730
  }>;
@@ -28,7 +28,7 @@ export declare type DrawerProps = {
28
28
  cancelText?: string;
29
29
  footer?: ButtonProps[];
30
30
  afterVisibleChange?: (visible?: boolean) => void;
31
- getContainer?: () => HTMLElement | string;
31
+ getContainer?: false | HTMLElement | (() => any);
32
32
  closeFunc?: () => Promise<any>;
33
33
  afterClose?: Function;
34
34
  };
@@ -2,7 +2,7 @@ import { RadioButton, RadioGroup, Button, FormItem as FormItem$1, Col as Col$1,
2
2
  import "ant-design-vue/es/form/style";
3
3
  import "ant-design-vue/es/row/style";
4
4
  import { computed, unref, getCurrentInstance, reactive, readonly, watchEffect, nextTick, toRaw, defineComponent, useAttrs, openBlock, createBlock, mergeProps, isRef, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createElementVNode, createVNode, normalizeProps, guardReactiveProps, createCommentVNode, toRefs, isVNode, ref, watch, resolveDirective, normalizeStyle, withDirectives, normalizeClass, onMounted, withKeys, createSlots, renderSlot } from "vue";
5
- import { useAppStore, isNumber, useI18n, isString, isFunction, error, useSlots, isArray, isBoolean, isNull, dispatchResize, isObject, deepMerge, isNullAndUnDef, isEmpty, useTimeoutFn } from "@dt-frames/core";
5
+ import { useAppStore, isNumber, useI18n, isString, isFunction, error, useSlots, isArray, isUnDef, isBoolean, isNull, dispatchResize, isObject, deepMerge, isNullAndUnDef, useTimeoutFn } from "@dt-frames/core";
6
6
  import { merge, isEqual, omit, cloneDeep, upperFirst, uniqBy, set } from "lodash-es";
7
7
  import { Input, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Tooltip, Form, FormItem } from "ant-design-vue";
8
8
  import { useHeader, UiSize } from "../../theme";
@@ -577,13 +577,35 @@ const _sfc_main$2 = {
577
577
  colProps,
578
578
  component,
579
579
  render,
580
- slot
580
+ slot,
581
+ span
581
582
  } = props.schema;
582
583
  const {
583
584
  colProps: gColProps,
584
- mode
585
+ mode,
586
+ span: gSpan
585
587
  } = props.formProps;
586
- let _colProps = colProps || gColProps || (mode === "search" ? appConf.ui.form.searchColspan : appConf.ui.form.dialogColspan);
588
+ let _colProps = {};
589
+ if (component === "InputTextArea") {
590
+ _colProps = {
591
+ span: 24
592
+ };
593
+ }
594
+ if (!isUnDef(colProps)) {
595
+ _colProps = colProps;
596
+ } else if (!isUnDef(span)) {
597
+ _colProps = {
598
+ span
599
+ };
600
+ } else if (!isUnDef(gColProps)) {
601
+ _colProps = gColProps;
602
+ } else if (!isUnDef(gSpan)) {
603
+ _colProps = {
604
+ span: gSpan
605
+ };
606
+ } else {
607
+ _colProps = mode === "search" ? appConf.ui.form.searchColspan : appConf.ui.form.dialogColspan;
608
+ }
587
609
  const values = unref(getValues);
588
610
  if (!component) {
589
611
  if (!render && !renderCol && !slot && !colSlot) {
@@ -594,9 +616,9 @@ const _sfc_main$2 = {
594
616
  if (component === "Divider") {
595
617
  let _slot;
596
618
  let cprops = unref(getComponentProps);
597
- const span = cprops?.span ?? 24;
619
+ const span2 = cprops?.span ?? 24;
598
620
  return createVNode(Col, {
599
- "span": span
621
+ "span": span2
600
622
  }, {
601
623
  default: () => [createVNode(Divider, cprops, _isSlot(_slot = renderLabel()) ? _slot : {
602
624
  default: () => [_slot]
@@ -1146,8 +1168,10 @@ const BasicProps = {
1146
1168
  default: () => ({})
1147
1169
  },
1148
1170
  colProps: {
1149
- type: Object,
1150
- default: () => ({})
1171
+ type: Object
1172
+ },
1173
+ span: {
1174
+ type: Number
1151
1175
  },
1152
1176
  size: {
1153
1177
  type: String
@@ -1229,14 +1253,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1229
1253
  const propsRef = ref();
1230
1254
  const schemaRef = ref(null);
1231
1255
  const getProps = computed(() => {
1232
- let colProps = props.colProps;
1233
- if (isEmpty(props.colProps)) {
1234
- colProps = props.mode === "search" ? getAppConf.ui.form.searchColspan || { span: 8 } : getAppConf.ui.form.dialogColspan || { span: 12 };
1235
- }
1236
1256
  return {
1237
1257
  ...props,
1238
1258
  ...getAppConf.ui.form,
1239
- colProps,
1240
1259
  ...unref(propsRef)
1241
1260
  };
1242
1261
  });
@@ -66,7 +66,9 @@ declare const _sfc_main: {
66
66
  };
67
67
  colProps: {
68
68
  type: PropType<Partial<import("../types/form.type").ColEx>>;
69
- default: () => {};
69
+ };
70
+ span: {
71
+ type: NumberConstructor;
70
72
  };
71
73
  size: {
72
74
  type: PropType<"middle" | "small" | "large">;
@@ -2,14 +2,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
2
2
  value: StringConstructor;
3
3
  placeholder: StringConstructor;
4
4
  }, {
5
- t: {
6
- (key: string): string;
7
- (key: string, locale: string): string;
8
- (key: string, locale: string, list: unknown[]): string;
9
- (key: string, locale: string, named: Record<string, unknown>): string;
10
- (key: string, list: unknown[]): string;
11
- (key: string, named: Record<string, unknown>): string;
12
- };
13
5
  getUiSize: import("vue").ComputedRef<import('../../../../theme').UiSize>;
14
6
  iconRef: any;
15
7
  props: any;
@@ -57,7 +57,9 @@ export declare const BasicProps: {
57
57
  };
58
58
  colProps: {
59
59
  type: PropType<Partial<ColEx>>;
60
- default: () => {};
60
+ };
61
+ span: {
62
+ type: NumberConstructor;
61
63
  };
62
64
  size: {
63
65
  type: PropType<"large" | "small" | "middle">;
@@ -45,6 +45,7 @@ declare type Schema<ComponentType, T> = {
45
45
  render?: (model: Recordable) => VNode | VNode[] | string;
46
46
  renderCol?: (model: Recordable) => VNode | VNode[] | string;
47
47
  colProps?: Partial<ColEx>;
48
+ span?: number;
48
49
  renderComponent?: ((model: Recordable) => Recordable) | VNode | VNode[] | string;
49
50
  slot?: string;
50
51
  colSlot?: string;
@@ -1,8 +1,9 @@
1
1
  import { DtEvent, Recordable, SelectOptions } from "@dt-frames/core";
2
2
  import dayjs from "dayjs";
3
3
  import { Ref, Slot, VNode, CSSProperties, ComputedRef } from "vue";
4
+ declare type StrOrDynamicStr = string | Ref<string> | ComputedRef<string>;
4
5
  declare type BaseInput = {
5
- placeholder?: string;
6
+ placeholder?: StrOrDynamicStr;
6
7
  addonAfter?: string | VNode;
7
8
  addonBefore?: string | VNode;
8
9
  allowClear?: boolean;
@@ -39,6 +40,7 @@ export declare type InputSearch = Input & {
39
40
  };
40
41
  export declare type InputTextArea = Input & {
41
42
  autosize?: boolean | object;
43
+ rows?: number;
42
44
  onPressEnter?: (e: DtEvent, model: Recordable) => void;
43
45
  onChange?: (e: DtEvent, model: Recordable) => void;
44
46
  };
@@ -107,7 +109,7 @@ export declare type Select = {
107
109
  open?: boolean;
108
110
  optionFilterProp?: string;
109
111
  options?: SelectOptions[] | ComputedRef<SelectOptions[]> | Ref<SelectOptions[]>;
110
- placeholder?: string;
112
+ placeholder?: StrOrDynamicStr;
111
113
  removeIcon?: VNode | Slot;
112
114
  searchValue?: string;
113
115
  showArrow?: boolean;
@@ -155,7 +157,7 @@ export declare type TreeSelect = {
155
157
  listHeight?: number;
156
158
  maxTagCount?: number;
157
159
  multiple?: boolean;
158
- placeholder?: string;
160
+ placeholder?: StrOrDynamicStr;
159
161
  replaceFields?: {
160
162
  children?: string;
161
163
  label?: string;
@@ -282,7 +284,7 @@ declare type BaseDatepicker = {
282
284
  mode?: 'time' | 'date' | 'month' | 'year' | 'decade';
283
285
  open?: boolean | Ref<boolean>;
284
286
  picker?: 'date' | 'week' | 'month' | 'quarter' | 'year';
285
- placeholder?: string;
287
+ placeholder?: StrOrDynamicStr;
286
288
  popupStyle?: CSSProperties;
287
289
  size?: 'large' | 'middle' | 'small';
288
290
  onOpenChange?: (status: boolean, model: Recordable) => void;