@maxtan/ez-ui 1.0.1 → 1.0.3
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.
- package/dist/index.cjs +1 -1
- package/dist/index.js +533 -528
- package/dist/types/index.d.ts +17 -25
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -27,7 +27,6 @@ import { ExtractPropTypes as ExtractPropTypes_2 } from 'vue';
|
|
|
27
27
|
import { EzFormItemProps as EzFormItemProps_2 } from '.';
|
|
28
28
|
import { FastTableEmits as FastTableEmits_2 } from '.';
|
|
29
29
|
import { FastTableErrorContext as FastTableErrorContext_2 } from '.';
|
|
30
|
-
import { FastTableExpose as FastTableExpose_2 } from '.';
|
|
31
30
|
import { FormData as FormData_3 } from '.';
|
|
32
31
|
import { FormGroupConfig as FormGroupConfig_2 } from '.';
|
|
33
32
|
import { FormInstance } from 'element-plus';
|
|
@@ -231,7 +230,7 @@ export declare type ComponentSize = 'large' | 'default' | 'small';
|
|
|
231
230
|
*/
|
|
232
231
|
export declare type ComponentType = 'default' | 'button' | 'border';
|
|
233
232
|
|
|
234
|
-
export declare const createTypedFastTable: <T extends object, P extends
|
|
233
|
+
export declare const createTypedFastTable: <T extends object, P extends QueryParams_2<any> = QueryParams_2, RequestParams = P, ResponseData = unknown>() => TypedFastTableComponent<T, P, RequestParams, ResponseData>;
|
|
235
234
|
|
|
236
235
|
export declare interface CustomFormItemConfig<T = unknown> extends FormItemConfigBase<T, FormFieldComponentAttrs<T>, never> {
|
|
237
236
|
/**
|
|
@@ -783,7 +782,7 @@ export declare const EzFastTable: ((<T extends Record<string, unknown> = Record<
|
|
|
783
782
|
border?: boolean;
|
|
784
783
|
rowKey?: TableRowKey_2<T>;
|
|
785
784
|
} & PublicProps;
|
|
786
|
-
expose(exposed: ShallowUnwrapRef<
|
|
785
|
+
expose(exposed: ShallowUnwrapRef<FastTableExpose<P>>): void;
|
|
787
786
|
attrs: any;
|
|
788
787
|
slots: Readonly<NonNullable<FastTableSlot<T, P>>> & {
|
|
789
788
|
form: (props: FastTableFormSlotProps<P>) => void;
|
|
@@ -1701,8 +1700,8 @@ export declare interface FastTableExpose<P extends QueryParams_2 = QueryParams_2
|
|
|
1701
1700
|
replaceParams: (nextParams: P, options?: FastTableParamsUpdateOptions) => void;
|
|
1702
1701
|
/** 重置到当前基线参数并重新查询 */
|
|
1703
1702
|
reset: () => void;
|
|
1704
|
-
/**
|
|
1705
|
-
captureInitialParams: () => void;
|
|
1703
|
+
/** 将当前参数或传入参数记录为新的重置基线 */
|
|
1704
|
+
captureInitialParams: (params?: P) => void;
|
|
1706
1705
|
/** 获取表格引用 */
|
|
1707
1706
|
getTableRef: TableExpose['getTableRef'];
|
|
1708
1707
|
/** 重新布局表格 */
|
|
@@ -1720,7 +1719,7 @@ export declare interface FastTableFormSlotProps<P extends QueryParams_2 = QueryP
|
|
|
1720
1719
|
search: () => void;
|
|
1721
1720
|
query: () => Promise<void>;
|
|
1722
1721
|
reset: () => void;
|
|
1723
|
-
captureInitialParams: () => void;
|
|
1722
|
+
captureInitialParams: (params?: P) => void;
|
|
1724
1723
|
patchParams: (patch: Partial<P>, options?: FastTableParamsUpdateOptions) => void;
|
|
1725
1724
|
replaceParams: (nextParams: P, options?: FastTableParamsUpdateOptions) => void;
|
|
1726
1725
|
}
|
|
@@ -1754,6 +1753,10 @@ export declare interface FastTableProps<T extends Record<string, unknown> = Reco
|
|
|
1754
1753
|
expanded?: boolean;
|
|
1755
1754
|
}
|
|
1756
1755
|
|
|
1756
|
+
export declare type FastTableRef<P extends QueryParams_2<any> = QueryParams_2> = FastTableExpose<P> | null;
|
|
1757
|
+
|
|
1758
|
+
declare type FastTableRowData<T extends object> = T & Record<string, unknown>;
|
|
1759
|
+
|
|
1757
1760
|
/** 插槽类型 */
|
|
1758
1761
|
export declare type FastTableSlot<D, P extends QueryParams_2 = QueryParams_2> = {
|
|
1759
1762
|
form: (props: FastTableFormSlotProps<P>) => void;
|
|
@@ -2179,10 +2182,10 @@ export declare interface QueryPanelProps {
|
|
|
2179
2182
|
* 通用查询参数类型
|
|
2180
2183
|
* 推荐在 DynamicForm / SearchForm / FastTable 组合场景中作为统一模型使用
|
|
2181
2184
|
*/
|
|
2182
|
-
export declare type QueryParams<T extends
|
|
2185
|
+
export declare type QueryParams<T extends object = Record<string, unknown>> = BaseQueryParams & Partial<T>;
|
|
2183
2186
|
|
|
2184
2187
|
/** 分页/查询参数类型 */
|
|
2185
|
-
declare type QueryParams_2<T extends
|
|
2188
|
+
declare type QueryParams_2<T extends object = Record<string, unknown>> = QueryParams<T>;
|
|
2186
2189
|
|
|
2187
2190
|
export declare type RadioFormItemAttrs = FormItemAttrs<Omit<RadioProps, 'options'>>;
|
|
2188
2191
|
|
|
@@ -2457,33 +2460,22 @@ export declare interface TreeSelectFormItemConfig<T = unknown> extends FormItemC
|
|
|
2457
2460
|
component?: never;
|
|
2458
2461
|
}
|
|
2459
2462
|
|
|
2460
|
-
export declare type TypedFastTableComponent<T extends object, P extends
|
|
2463
|
+
export declare type TypedFastTableComponent<T extends object, P extends QueryParams_2<any> = QueryParams_2, RequestParams = P, ResponseData = unknown> = typeof EzFastTable & {
|
|
2461
2464
|
new (): {
|
|
2462
|
-
$props: TypedFastTableProps<T, P>;
|
|
2465
|
+
$props: TypedFastTableProps<T, P, RequestParams, ResponseData>;
|
|
2463
2466
|
$slots: TypedFastTableSlots<T, P>;
|
|
2464
2467
|
};
|
|
2465
2468
|
};
|
|
2466
2469
|
|
|
2467
|
-
declare type TypedFastTableErrorSlotProps<P extends
|
|
2468
|
-
params: P;
|
|
2469
|
-
};
|
|
2470
|
+
export declare type TypedFastTableErrorSlotProps<P extends QueryParams_2<any> = QueryParams_2> = FastTableErrorSlotProps<P>;
|
|
2470
2471
|
|
|
2471
|
-
declare type TypedFastTableFormSlotProps<P extends
|
|
2472
|
-
params: P;
|
|
2473
|
-
};
|
|
2472
|
+
export declare type TypedFastTableFormSlotProps<P extends QueryParams_2<any> = QueryParams_2> = FastTableFormSlotProps<P>;
|
|
2474
2473
|
|
|
2475
|
-
declare type TypedFastTableProps<T extends object, P extends
|
|
2476
|
-
params?: P;
|
|
2474
|
+
export declare type TypedFastTableProps<T extends object, P extends QueryParams_2<any> = QueryParams_2, RequestParams = P, ResponseData = unknown> = Omit<FastTableProps<FastTableRowData<T>, P, RequestParams, ResponseData>, 'columns'> & {
|
|
2477
2475
|
columns: TableColumn<T>[];
|
|
2478
2476
|
};
|
|
2479
2477
|
|
|
2480
|
-
declare type TypedFastTableSlots<T extends object, P extends
|
|
2481
|
-
form?: (props: TypedFastTableFormSlotProps<P>) => void;
|
|
2482
|
-
header?: (props: TableHeaderProps<T>) => void;
|
|
2483
|
-
freeArea?: (props: TypedFastTableFormSlotProps<P>) => void;
|
|
2484
|
-
empty?: () => void;
|
|
2485
|
-
error?: (props: TypedFastTableErrorSlotProps<P>) => void;
|
|
2486
|
-
} & TableSlot<T>;
|
|
2478
|
+
export declare type TypedFastTableSlots<T extends object, P extends QueryParams_2<any> = QueryParams_2> = FastTableSlot<T, P>;
|
|
2487
2479
|
|
|
2488
2480
|
export declare type UploadImagesFormItemAttrs = FormItemAttrs<Omit<ImageUpload, 'disabled'>>;
|
|
2489
2481
|
|