@qin-ui/element-plus-pro 1.0.2 → 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/es/index.d.ts +14 -14
- package/package.json +2 -3
package/es/index.d.ts
CHANGED
|
@@ -410,8 +410,8 @@ declare const _default_2: <T extends Table<any> = Table>(__VLS_props: NonNullabl
|
|
|
410
410
|
container?: ContainerComponent | false;
|
|
411
411
|
};
|
|
412
412
|
tableContainer?: ContainerComponent | false;
|
|
413
|
-
columns?: Columns<T extends Table<any, infer R extends
|
|
414
|
-
data?: (T extends Table<any, infer R extends
|
|
413
|
+
columns?: Columns<T extends Table<any, infer R extends Data> ? R : any>;
|
|
414
|
+
data?: (T extends Table<any, infer R extends Data> ? R : any)[];
|
|
415
415
|
pagination?: false | Partial<PaginationProps>;
|
|
416
416
|
} & Omit<TableProps, "data">) & Partial<{}>> & PublicProps;
|
|
417
417
|
expose(exposed: ShallowUnwrapRef< {}>): void;
|
|
@@ -739,7 +739,7 @@ declare type SearchFormProps = {
|
|
|
739
739
|
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps>;
|
|
740
740
|
} & /* @vue-ignore */ _FormProps & AllowedComponentProps;
|
|
741
741
|
|
|
742
|
-
declare type SetColumn<
|
|
742
|
+
declare type SetColumn<T extends Data = Data, C extends BaseColumn<T> = BaseColumn<T>> = (key: Path<T>, column: C | ((pre: Readonly<C>) => C), options?: {
|
|
743
743
|
updateType?: 'rewrite' | 'merge';
|
|
744
744
|
} & UpdateColumnOptions) => void;
|
|
745
745
|
|
|
@@ -762,24 +762,24 @@ export declare type Slots = {
|
|
|
762
762
|
};
|
|
763
763
|
|
|
764
764
|
/**
|
|
765
|
-
* 重新定义 Table 类型,将 Column 类型绑定为 element-plus-pro 的 Column<
|
|
765
|
+
* 重新定义 Table 类型,将 Column 类型绑定为 element-plus-pro 的 Column<T>
|
|
766
766
|
*/
|
|
767
|
-
export declare type Table<D extends Data = Data, T extends
|
|
767
|
+
export declare type Table<D extends Data = Data, T extends Data = ExtendWithAny<D>> = Omit<Table_2<D, T, Column<T>>, 'dataSource'> & {
|
|
768
768
|
/**
|
|
769
769
|
* element-plus table 数据源
|
|
770
770
|
*/
|
|
771
771
|
data: Ref<T[]>;
|
|
772
772
|
};
|
|
773
773
|
|
|
774
|
-
declare type Table_2<D extends Data = Data, T extends
|
|
775
|
-
columns: Ref<Columns_2<
|
|
774
|
+
declare type Table_2<D extends Data = Data, T extends Data = ExtendWithAny<D>, C extends BaseColumn<T> = BaseColumn<T>> = {
|
|
775
|
+
columns: Ref<Columns_2<T, C>>;
|
|
776
776
|
dataSource: Ref<T[]>;
|
|
777
777
|
pageParam: Reactive<PageParam>;
|
|
778
778
|
searchForm: Form_2<D>;
|
|
779
|
-
setColumn: SetColumn<
|
|
780
|
-
deleteColumn: (path: Path<
|
|
781
|
-
appendColumn: (path: Path<
|
|
782
|
-
prependColumn: (path: Path<
|
|
779
|
+
setColumn: SetColumn<T, C>;
|
|
780
|
+
deleteColumn: (path: Path<T> | ColumnFindBy<T, C>, options?: UpdateColumnOptions) => void;
|
|
781
|
+
appendColumn: (path: Path<T> | ColumnFindBy<T, C> | undefined, column: C | Columns_2<T, C>, options?: UpdateColumnOptions) => void;
|
|
782
|
+
prependColumn: (path: Path<T> | ColumnFindBy<T, C> | undefined, column: C | Columns_2<T, C>, options?: UpdateColumnOptions) => void;
|
|
783
783
|
setPageParam: SetPageParam;
|
|
784
784
|
resetQueryParams: () => void;
|
|
785
785
|
};
|
|
@@ -879,10 +879,10 @@ declare const useFormRef_2: <F = any>() => {
|
|
|
879
879
|
setFormRef: (inst: F) => void;
|
|
880
880
|
};
|
|
881
881
|
|
|
882
|
-
export declare const useTable: <D extends Data = Data, T extends
|
|
882
|
+
export declare const useTable: <D extends Data = Data, T extends Data = ExtendWithAny<D>>(params?: UseTableParams<D, T>) => Table<D, T>;
|
|
883
883
|
|
|
884
|
-
declare type UseTableParams<D extends Data = Data, T extends
|
|
885
|
-
columns?: Columns<
|
|
884
|
+
declare type UseTableParams<D extends Data = Data, T extends Data = ExtendWithAny<D>> = {
|
|
885
|
+
columns?: Columns<T>;
|
|
886
886
|
data?: T[];
|
|
887
887
|
pageParam?: PageParam;
|
|
888
888
|
searchParam?: ExtendWithAny<DeepPartial<D>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qin-ui/element-plus-pro",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "基于 element-plus 的二次封装组件",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
"@qin-ui/core": "workspace:^",
|
|
40
40
|
"@types/lodash-es": "^4.17.12",
|
|
41
41
|
"element-plus": "^2.13.6",
|
|
42
|
-
"lodash-es": "^4.17.21"
|
|
43
|
-
"vue": "^3.5.29"
|
|
42
|
+
"lodash-es": "^4.17.21"
|
|
44
43
|
},
|
|
45
44
|
"publishConfig": {
|
|
46
45
|
"access": "public",
|