@dazhicheng/ui 1.5.147 → 1.5.149

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.
@@ -1,12 +1,22 @@
1
1
  import { ComputedRef } from 'vue';
2
- import { ExtendedFormApi, FormActions, TtFormProps } from './types';
2
+ import { FormSchema, ExtendedFormApi, FormActions, TtFormProps } from './types';
3
3
  type ExtendFormProps = TtFormProps & {
4
4
  formApi?: ExtendedFormApi;
5
5
  };
6
6
  export declare const injectFormProps: <T extends [ExtendFormProps | ComputedRef<ExtendFormProps>, FormActions] | null | undefined = [ExtendFormProps | ComputedRef<ExtendFormProps>, FormActions]>(fallback?: T | undefined) => T extends null ? [ExtendFormProps | ComputedRef<ExtendFormProps>, FormActions] | null : [ExtendFormProps | ComputedRef<ExtendFormProps>, FormActions], provideFormProps: (contextValue: [ExtendFormProps | ComputedRef<ExtendFormProps>, FormActions]) => [ExtendFormProps | ComputedRef<ExtendFormProps>, FormActions];
7
7
  export declare const injectComponentRefMap: <T extends Map<string, unknown> | null | undefined = Map<string, unknown>>(fallback?: T | undefined) => T extends null ? Map<string, unknown> | null : Map<string, unknown>, provideComponentRefMap: (contextValue: Map<string, unknown>) => Map<string, unknown>;
8
+ /** 提取单个字段默认值:defaultValue 优先,其次 Zod rules */
9
+ export declare function resolveSchemaItemDefaultValue(item: FormSchema): unknown | undefined;
10
+ /**
11
+ * 解析 useArraySchema 字段的 initialValues
12
+ * - 有 defaultValue 数组:沿用并在每行合并静态 arraySchema 嵌套默认值
13
+ * - 无 defaultValue:默认一行并合并嵌套默认值
14
+ * - arraySchema 为函数:仅顶层行,嵌套由组件挂载时补全
15
+ * - 父行合并后会对嵌套数组递归补全(空嵌套数组、部分行缺字段)
16
+ */
17
+ export declare function resolveArrayFieldInitialValue(item: FormSchema): unknown;
8
18
  export declare function useFormInitial(props: ComputedRef<TtFormProps> | TtFormProps): {
9
19
  delegatedSlots: ComputedRef<string[]>;
10
- form: import('vee-validate').FormContext<Record<string, any>, Record<string, any>>;
20
+ form: import('vee-validate').FormContext<Record<string, unknown>, Record<string, unknown>>;
11
21
  };
12
22
  export {};
@@ -13,15 +13,15 @@ export declare const TtTableAction: import('../../../../utils/src').SFCWithInsta
13
13
  type: import('vue').PropType<Record<string, any>>;
14
14
  default: undefined;
15
15
  };
16
- divider: any;
17
16
  stopButtonPropagation: any;
18
17
  showBtnNums: any;
19
18
  popoverWidth: any;
19
+ wrap: any;
20
20
  }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
21
+ wrap: any;
21
22
  rowIndex: number;
22
23
  actions: import('.').TtActionItem[];
23
24
  slotContext: Record<string, any>;
24
- divider: any;
25
25
  stopButtonPropagation: any;
26
26
  showBtnNums: any;
27
27
  popoverWidth: any;
@@ -45,15 +45,15 @@ export declare const TtTableAction: import('../../../../utils/src').SFCWithInsta
45
45
  type: import('vue').PropType<Record<string, any>>;
46
46
  default: undefined;
47
47
  };
48
- divider: any;
49
48
  stopButtonPropagation: any;
50
49
  showBtnNums: any;
51
50
  popoverWidth: any;
51
+ wrap: any;
52
52
  }>> & Readonly<{}>, {}, {}, {}, {}, {
53
+ wrap: any;
53
54
  rowIndex: number;
54
55
  actions: import('.').TtActionItem[];
55
56
  slotContext: Record<string, any>;
56
- divider: any;
57
57
  stopButtonPropagation: any;
58
58
  showBtnNums: any;
59
59
  popoverWidth: any;
@@ -74,15 +74,15 @@ export declare const TtTableAction: import('../../../../utils/src').SFCWithInsta
74
74
  type: import('vue').PropType<Record<string, any>>;
75
75
  default: undefined;
76
76
  };
77
- divider: any;
78
77
  stopButtonPropagation: any;
79
78
  showBtnNums: any;
80
79
  popoverWidth: any;
80
+ wrap: any;
81
81
  }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
82
+ wrap: any;
82
83
  rowIndex: number;
83
84
  actions: import('.').TtActionItem[];
84
85
  slotContext: Record<string, any>;
85
- divider: any;
86
86
  stopButtonPropagation: any;
87
87
  showBtnNums: any;
88
88
  popoverWidth: any;
@@ -112,8 +112,8 @@ export declare const TtTableButton: import('../../../../utils/src').SFCWithInsta
112
112
  stopButtonPropagation: any;
113
113
  }>> & Readonly<{}>, {
114
114
  actions: import('.').TtActionItem[];
115
- divider: any;
116
115
  stopButtonPropagation: any;
116
+ divider: any;
117
117
  }, {}, {}, {
118
118
  disabledTip: import('vue').Directive;
119
119
  }, string, import('vue').ComponentProvideOptions, true, {}, any>> & Record<string, any>;
@@ -30,13 +30,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
30
30
  default: undefined;
31
31
  };
32
32
  /** 是否分割线 */
33
- divider: any;
34
33
  /** 是否清除冒泡 */
35
34
  stopButtonPropagation: any;
36
35
  /** 显示buttton的个数 默认是2 */
37
36
  showBtnNums: any;
38
- /** width */
37
+ /** 弹出框的宽度 */
39
38
  popoverWidth: any;
39
+ /** 是否自动换行 */
40
+ wrap: any;
40
41
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
41
42
  /** 操作项 */
42
43
  actions: {
@@ -54,18 +55,19 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
54
55
  default: undefined;
55
56
  };
56
57
  /** 是否分割线 */
57
- divider: any;
58
58
  /** 是否清除冒泡 */
59
59
  stopButtonPropagation: any;
60
60
  /** 显示buttton的个数 默认是2 */
61
61
  showBtnNums: any;
62
- /** width */
62
+ /** 弹出框的宽度 */
63
63
  popoverWidth: any;
64
+ /** 是否自动换行 */
65
+ wrap: any;
64
66
  }>> & Readonly<{}>, {
67
+ wrap: any;
65
68
  rowIndex: number;
66
69
  actions: TtActionItem[];
67
70
  slotContext: Record<string, any>;
68
- divider: any;
69
71
  stopButtonPropagation: any;
70
72
  showBtnNums: any;
71
73
  popoverWidth: any;
@@ -22,8 +22,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
22
22
  stopButtonPropagation: any;
23
23
  }>> & Readonly<{}>, {
24
24
  actions: TtActionItem[];
25
- divider: any;
26
25
  stopButtonPropagation: any;
26
+ divider: any;
27
27
  }, {}, {}, {
28
28
  disabledTip: import('vue').Directive;
29
29
  }, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -81,6 +81,10 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
81
81
  readonly type: import('vue').PropType<string>;
82
82
  readonly default: undefined;
83
83
  };
84
+ readonly beforeDownload: {
85
+ readonly type: import('vue').PropType<boolean | ((file: import('.').TtUploadFileItem) => PromiseLike<boolean>)>;
86
+ readonly default: false;
87
+ };
84
88
  readonly beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
85
89
  (): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
86
90
  new (): any;
@@ -271,6 +275,10 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
271
275
  readonly type: import('vue').PropType<string>;
272
276
  readonly default: undefined;
273
277
  };
278
+ readonly beforeDownload: {
279
+ readonly type: import('vue').PropType<boolean | ((file: import('.').TtUploadFileItem) => PromiseLike<boolean>)>;
280
+ readonly default: false;
281
+ };
274
282
  readonly beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
275
283
  (): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
276
284
  new (): any;
@@ -418,6 +426,7 @@ export declare const TtUpload: import('../../../../utils/src').SFCWithInstall<im
418
426
  readonly gridColumns: number;
419
427
  readonly showCount: boolean;
420
428
  readonly ossDir: string;
429
+ readonly beforeDownload: boolean | ((file: import('.').TtUploadFileItem) => PromiseLike<boolean>);
421
430
  readonly beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
422
431
  readonly onRemove: (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
423
432
  readonly onPreview: (uploadFile: import('element-plus').UploadFile) => void;
@@ -81,6 +81,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
81
81
  readonly type: import('vue').PropType<string>;
82
82
  readonly default: undefined;
83
83
  };
84
+ readonly beforeDownload: {
85
+ readonly type: import('vue').PropType<boolean | ((file: TtUploadFileItem) => PromiseLike<boolean>)>;
86
+ readonly default: false;
87
+ };
84
88
  readonly beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
85
89
  (): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
86
90
  new (): any;
@@ -109,7 +113,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
109
113
  (): (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
110
114
  new (): any;
111
115
  readonly prototype: any;
112
- } | (((new (... /** 渲染上传拖拽区域 */args: any[]) => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
116
+ } | (((new (...args: any[]) => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
113
117
  (): (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
114
118
  new (): any;
115
119
  readonly prototype: any;
@@ -271,6 +275,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
271
275
  readonly type: import('vue').PropType<string>;
272
276
  readonly default: undefined;
273
277
  };
278
+ readonly beforeDownload: {
279
+ readonly type: import('vue').PropType<boolean | ((file: TtUploadFileItem) => PromiseLike<boolean>)>;
280
+ readonly default: false;
281
+ };
274
282
  readonly beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
275
283
  (): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
276
284
  new (): any;
@@ -299,7 +307,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
299
307
  (): (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
300
308
  new (): any;
301
309
  readonly prototype: any;
302
- } | (((new (... /** 渲染上传拖拽区域 */args: any[]) => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
310
+ } | (((new (...args: any[]) => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
303
311
  (): (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
304
312
  new (): any;
305
313
  readonly prototype: any;
@@ -418,6 +426,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
418
426
  readonly gridColumns: number;
419
427
  readonly showCount: boolean;
420
428
  readonly ossDir: string;
429
+ readonly beforeDownload: boolean | ((file: TtUploadFileItem) => PromiseLike<boolean>);
421
430
  readonly beforeUpload: (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
422
431
  readonly onRemove: (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
423
432
  readonly onPreview: (uploadFile: import('element-plus').UploadFile) => void;
@@ -142,6 +142,13 @@ export declare const ttUploadProps: {
142
142
  readonly type: PropType<string>;
143
143
  readonly default: undefined;
144
144
  };
145
+ /**
146
+ * 下载前的参数
147
+ */
148
+ readonly beforeDownload: {
149
+ readonly type: PropType<boolean | ((file: TtUploadFileItem) => PromiseLike<boolean>)>;
150
+ readonly default: false;
151
+ };
145
152
  readonly beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
146
153
  (): (rawFile: UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
147
154
  new (): any;