@dazhicheng/ui 1.4.19 → 1.4.21

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.
@@ -108,11 +108,11 @@ export declare const TtPart: import('../../../../utils/src').SFCWithInstall<{
108
108
  modelValue: boolean;
109
109
  labelWidth: string;
110
110
  headerClass: string;
111
- colSpan: number;
112
- shadow: boolean;
113
111
  isExpand: boolean;
114
112
  showExpand: boolean;
115
113
  defaultExpand: boolean;
114
+ shadow: boolean;
115
+ colSpan: number;
116
116
  colGap: number;
117
117
  labelPosition: string;
118
118
  segmentClass: string;
@@ -236,11 +236,11 @@ export declare const TtPart: import('../../../../utils/src').SFCWithInstall<{
236
236
  modelValue: boolean;
237
237
  labelWidth: string;
238
238
  headerClass: string;
239
- colSpan: number;
240
- shadow: boolean;
241
239
  isExpand: boolean;
242
240
  showExpand: boolean;
243
241
  defaultExpand: boolean;
242
+ shadow: boolean;
243
+ colSpan: number;
244
244
  colGap: number;
245
245
  labelPosition: string;
246
246
  segmentClass: string;
@@ -362,11 +362,11 @@ export declare const TtPart: import('../../../../utils/src').SFCWithInstall<{
362
362
  modelValue: boolean;
363
363
  labelWidth: string;
364
364
  headerClass: string;
365
- colSpan: number;
366
- shadow: boolean;
367
365
  isExpand: boolean;
368
366
  showExpand: boolean;
369
367
  defaultExpand: boolean;
368
+ shadow: boolean;
369
+ colSpan: number;
370
370
  colGap: number;
371
371
  labelPosition: string;
372
372
  segmentClass: string;
@@ -227,11 +227,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
227
227
  modelValue: boolean;
228
228
  labelWidth: string;
229
229
  headerClass: string;
230
- colSpan: number;
231
- shadow: boolean;
232
230
  isExpand: boolean;
233
231
  showExpand: boolean;
234
232
  defaultExpand: boolean;
233
+ shadow: boolean;
234
+ colSpan: number;
235
235
  colGap: number;
236
236
  labelPosition: string;
237
237
  segmentClass: string;
@@ -564,26 +564,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
564
564
  type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.KeyboardConfig>;
565
565
  default: () => import("vxe-table").VxeTablePropTypes.KeyboardConfig<any> | undefined;
566
566
  };
567
- clipConfig: {
568
- type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.ClipConfig>;
569
- default: () => import("vxe-table").VxeTablePropTypes.ClipConfig<any> | undefined;
570
- };
571
567
  menuConfig: {
572
568
  type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.MenuConfig>;
573
569
  default: () => {};
574
570
  };
575
- fnrConfig: {
576
- type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.FnrConfig>;
577
- default: () => {};
578
- };
579
571
  mouseConfig: {
580
572
  type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.MouseConfig>;
581
573
  default: () => import("vxe-table").VxeTablePropTypes.MouseConfig | undefined;
582
574
  };
583
- areaConfig: {
584
- type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.AreaConfig>;
585
- default: () => import("vxe-table").VxeTablePropTypes.AreaConfig<any> | undefined;
586
- };
587
575
  checkboxConfig: {
588
576
  type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.CheckboxConfig>;
589
577
  default: () => import("vxe-table").VxeTablePropTypes.CheckboxConfig<import("vxe-table").VxeTablePropTypes.Row> | undefined;
@@ -854,26 +842,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
854
842
  type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.KeyboardConfig>;
855
843
  default: () => import("vxe-table").VxeTablePropTypes.KeyboardConfig<any> | undefined;
856
844
  };
857
- clipConfig: {
858
- type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.ClipConfig>;
859
- default: () => import("vxe-table").VxeTablePropTypes.ClipConfig<any> | undefined;
860
- };
861
845
  menuConfig: {
862
846
  type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.MenuConfig>;
863
847
  default: () => {};
864
848
  };
865
- fnrConfig: {
866
- type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.FnrConfig>;
867
- default: () => {};
868
- };
869
849
  mouseConfig: {
870
850
  type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.MouseConfig>;
871
851
  default: () => import("vxe-table").VxeTablePropTypes.MouseConfig | undefined;
872
852
  };
873
- areaConfig: {
874
- type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.AreaConfig>;
875
- default: () => import("vxe-table").VxeTablePropTypes.AreaConfig<any> | undefined;
876
- };
877
853
  checkboxConfig: {
878
854
  type: import('vue').PropType<import("vxe-table").VxeTablePropTypes.CheckboxConfig>;
879
855
  default: () => import("vxe-table").VxeTablePropTypes.CheckboxConfig<import("vxe-table").VxeTablePropTypes.Row> | undefined;
@@ -1106,10 +1082,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
1106
1082
  checkboxConfig: import("vxe-table").VxeTablePropTypes.CheckboxConfig<import("vxe-table").VxeTablePropTypes.Row>;
1107
1083
  menuConfig: import("vxe-table").VxeTablePropTypes.MenuConfig<any>;
1108
1084
  mouseConfig: import("vxe-table").VxeTablePropTypes.MouseConfig;
1109
- areaConfig: import("vxe-table").VxeTablePropTypes.AreaConfig<any>;
1110
- fnrConfig: import("vxe-table").VxeTablePropTypes.FnrConfig<any>;
1111
1085
  keyboardConfig: import("vxe-table").VxeTablePropTypes.KeyboardConfig<any>;
1112
- clipConfig: import("vxe-table").VxeTablePropTypes.ClipConfig<any>;
1113
1086
  emptyText: string;
1114
1087
  clearTreeExpand: any;
1115
1088
  toolTipErrorPlacement: "top" | "bottom" | "left" | "right";
@@ -2,11 +2,11 @@ import { VxeTableDefines } from 'vxe-table';
2
2
  import { TtModalExtendedModalApi } from '../../../tt-modal';
3
3
  interface OpenModalParams {
4
4
  columns: VxeTableDefines.ColumnOptions[];
5
- defaultDisplayFields?: string[];
5
+ displayFields?: string[];
6
6
  disabledColumnField: string[];
7
7
  }
8
8
  /** @param params - 列数据、默认展示字段、禁用字段 */
9
- declare function openModal({ columns, defaultDisplayFields, disabledColumnField }: OpenModalParams): void;
9
+ declare function openModal({ columns, displayFields, disabledColumnField }: OpenModalParams): void;
10
10
  declare const _default: import('vue').DefineComponent<{}, {
11
11
  handleSubmit: import('@vueuse/core').UseDebounceFnReturn<() => void>;
12
12
  openModal: typeof openModal;
@@ -16,4 +16,9 @@ export declare function useCustomColumns({ getTableProps, tableMethods, getProps
16
16
  getProps: ComputedRef<TtTableFormProps>;
17
17
  }): {
18
18
  initCustomSetting: () => Promise<void>;
19
+ saveColumns: (params: {
20
+ columnKey: string;
21
+ columns: string[];
22
+ userId: string | number;
23
+ }) => Promise<any>;
19
24
  };
@@ -67,12 +67,19 @@ export declare function useTableRender(options: TtTableProps): readonly [DefineS
67
67
  defaultDisplayFields?: string[];
68
68
  getColumnsApi?: (params: {
69
69
  columnsKey: string;
70
+ userId: string | number;
70
71
  }) => Promise<{
71
72
  data: any;
72
73
  }>;
73
74
  setColumnsApi?: (params: {
74
75
  columnKey: string;
75
76
  columns: string[];
77
+ userId: string | number;
78
+ }) => Promise<any>;
79
+ updateColumnsApi?: (params: {
80
+ columnKey: string;
81
+ columns: string[];
82
+ userId: string | number;
76
83
  }) => Promise<any>;
77
84
  getSyncSlotComponent?: (column: any, row: any, type: "default" | "edit") => import('vue').VNode | import('vue').VNode[] | string;
78
85
  customizeColumn?: (column: import("vxe-table").VxeTableDefines.ColumnOptions) => import("vxe-table").VxeTableDefines.ColumnOptions;
@@ -277,31 +277,16 @@ export declare const tableProProps: {
277
277
  type: PropType<VxeTablePropTypes.KeyboardConfig>;
278
278
  default: () => VxeTablePropTypes.KeyboardConfig<any> | undefined;
279
279
  };
280
- /** 复制/粘贴配置项 */
281
- clipConfig: {
282
- type: PropType<VxeTablePropTypes.ClipConfig>;
283
- default: () => VxeTablePropTypes.ClipConfig<any> | undefined;
284
- };
285
280
  /** 右键菜单配置项 */
286
281
  menuConfig: {
287
282
  type: PropType<VxeTablePropTypes.MenuConfig>;
288
283
  default: () => {};
289
284
  };
290
- /** 查找/替换配置项 */
291
- fnrConfig: {
292
- type: PropType<VxeTablePropTypes.FnrConfig>;
293
- default: () => {};
294
- };
295
285
  /** 鼠标配置项 */
296
286
  mouseConfig: {
297
287
  type: PropType<VxeTablePropTypes.MouseConfig>;
298
288
  default: () => VxeTablePropTypes.MouseConfig | undefined;
299
289
  };
300
- /** 区域选取配置项 */
301
- areaConfig: {
302
- type: PropType<VxeTablePropTypes.AreaConfig>;
303
- default: () => VxeTablePropTypes.AreaConfig<any> | undefined;
304
- };
305
290
  /** 复选框配置项 */
306
291
  checkboxConfig: {
307
292
  type: PropType<VxeTablePropTypes.CheckboxConfig>;
@@ -368,31 +353,16 @@ export declare const tableOtherProps: {
368
353
  type: PropType<VxeTablePropTypes.KeyboardConfig>;
369
354
  default: () => VxeTablePropTypes.KeyboardConfig<any> | undefined;
370
355
  };
371
- /** 复制/粘贴配置项 */
372
- clipConfig: {
373
- type: PropType<VxeTablePropTypes.ClipConfig>;
374
- default: () => VxeTablePropTypes.ClipConfig<any> | undefined;
375
- };
376
356
  /** 右键菜单配置项 */
377
357
  menuConfig: {
378
358
  type: PropType<VxeTablePropTypes.MenuConfig>;
379
359
  default: () => {};
380
360
  };
381
- /** 查找/替换配置项 */
382
- fnrConfig: {
383
- type: PropType<VxeTablePropTypes.FnrConfig>;
384
- default: () => {};
385
- };
386
361
  /** 鼠标配置项 */
387
362
  mouseConfig: {
388
363
  type: PropType<VxeTablePropTypes.MouseConfig>;
389
364
  default: () => VxeTablePropTypes.MouseConfig | undefined;
390
365
  };
391
- /** 区域选取配置项 */
392
- areaConfig: {
393
- type: PropType<VxeTablePropTypes.AreaConfig>;
394
- default: () => VxeTablePropTypes.AreaConfig<any> | undefined;
395
- };
396
366
  /** 复选框配置项 */
397
367
  checkboxConfig: {
398
368
  type: PropType<VxeTablePropTypes.CheckboxConfig>;
@@ -188,13 +188,21 @@ export type TtTableProps = {
188
188
  /** 自定义列服务端配置接口 - 获取 */
189
189
  getColumnsApi?: (params: {
190
190
  columnsKey: string;
191
+ userId: string | number;
191
192
  }) => Promise<{
192
193
  data: any;
193
194
  }>;
194
- /** 自定义列服务端配置接口 - 保存 */
195
+ /** 自定义列服务端配置接口 - 当没有id值得时候 */
195
196
  setColumnsApi?: (params: {
196
197
  columnKey: string;
197
198
  columns: string[];
199
+ userId: string | number;
200
+ }) => Promise<any>;
201
+ /** 自定义列服务端配置接口 - 当有id值得时候 */
202
+ updateColumnsApi?: (params: {
203
+ columnKey: string;
204
+ columns: string[];
205
+ userId: string | number;
198
206
  }) => Promise<any>;
199
207
  /** 外部插槽 */
200
208
  getSyncSlotComponent?: (column: any, row: any, type: "default" | "edit") => VNode | VNode[] | string;
@@ -4,6 +4,10 @@ export type Fn<T = any, R = T> = (...arg: T[]) => R;
4
4
  export type Nullable<T> = T | null;
5
5
  export type Recordable<T = any> = Record<string, T>;
6
6
  export type TtUiGlobalConfig = {
7
+ /**
8
+ * 登录的用户id
9
+ */
10
+ userId?: string | number;
7
11
  table?: {
8
12
  /**
9
13
  * 是否开启服务端缓存
@@ -71,32 +75,13 @@ export type TtUiGlobalConfig = {
71
75
  * @default { isClip: true }
72
76
  */
73
77
  keyboardConfig?: VxeTablePropTypes.KeyboardConfig;
74
- /**
75
- * @default
76
- * {
77
- isPaste: false,
78
- isCopy: true,
79
- }
80
- */
81
- clipConfig?: VxeTablePropTypes.ClipConfig;
82
78
  /**
83
79
  * @default
84
80
  * {
85
81
  selected: false,
86
- area: true,
87
- extension: true,
88
82
  }
89
83
  */
90
84
  mouseConfig?: VxeTablePropTypes.MouseConfig;
91
- /**
92
- * @default
93
- * {
94
- extendByCopy: false,
95
- extendByCalc: false,
96
- excludeFields: ['dragBtn'],
97
- }
98
- */
99
- areaConfig?: VxeTablePropTypes.AreaConfig;
100
85
  /**
101
86
  * @default
102
87
  * {
package/dist/index.d.ts CHANGED
@@ -13,6 +13,8 @@ export * from './directives';
13
13
  export * from './components/tt-form';
14
14
  export * from './components/tt-image';
15
15
  export * from './components/tt-loading';
16
+ export * from './components/tt-part';
17
+ export * from './components/tt-part-item';
16
18
  export * from './components/tt-table';
17
19
  export { useFormat } from './hooks/useFormat';
18
20
  export { useLoading } from './hooks/useLoading';