@dazhicheng/ui 1.4.19 → 1.4.20

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;
@@ -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;
@@ -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
  * 是否开启服务端缓存
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';