@oiij/naive-ui 0.0.36 → 0.0.38
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/components/data-table-plus/index.d.ts +6 -1
- package/dist/components/preset-form/index.d.ts +1 -0
- package/dist/components/remote-request/index.d.ts +1 -1
- package/dist/components.cjs +17 -17
- package/dist/components.js +1645 -1639
- package/dist/components.umd.cjs +17 -17
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataTableColumns, DataTableInst, DataTableProps, DataTableSortState, DropdownOption, FlexProps, FormItemProps, GridItemProps, GridProps, PaginationProps } from 'naive-ui';
|
|
1
|
+
import { DataTableColumns, DataTableFilterState, DataTableInst, DataTableProps, DataTableSortState, DropdownOption, FlexProps, FormItemProps, GridItemProps, GridProps, PaginationProps } from 'naive-ui';
|
|
2
2
|
import { FilterState, TableBaseColumn } from 'naive-ui/es/data-table/src/interface';
|
|
3
3
|
import { ComputedRef, CSSProperties, Ref, ShallowRef, VNode } from 'vue';
|
|
4
4
|
import { useRequestResult } from 'vue-hooks-plus/es/useRequest/types';
|
|
@@ -27,6 +27,8 @@ export type DataTablePlusExposeRefsBase<P extends RObject, D extends RObject, R
|
|
|
27
27
|
rawList: ComputedRef<R[]>;
|
|
28
28
|
};
|
|
29
29
|
export type DataTablePlusExposeRefs<P extends RObject, D extends RObject, R extends RObject> = DataTablePlusExposeRefsBase<P, D, R> & {
|
|
30
|
+
filters: Ref<DataTableFilterState | undefined>;
|
|
31
|
+
sorters: Ref<Record<string, DataTableSortState> | undefined>;
|
|
30
32
|
dataTableRef: Readonly<ShallowRef<DataTableInst | null>>;
|
|
31
33
|
};
|
|
32
34
|
export type DataTablePlusFilterOptions<P extends RObject, D extends RObject, R extends RObject> = (PresetInputOptions & {
|
|
@@ -36,6 +38,7 @@ export type DataTablePlusFilterOptions<P extends RObject, D extends RObject, R e
|
|
|
36
38
|
class?: string;
|
|
37
39
|
});
|
|
38
40
|
collapsed?: boolean;
|
|
41
|
+
hidden?: boolean;
|
|
39
42
|
gridSpan?: string | number;
|
|
40
43
|
gridItemProps?: GridItemProps;
|
|
41
44
|
render?: (refs: DataTablePlusExposeRefs<P, D, R>, actions: DataTablePlusExposeActions<P, D>) => VNode | null;
|
|
@@ -52,6 +55,8 @@ export type DataTablePlusProps<P extends RObject, D extends RObject, R extends R
|
|
|
52
55
|
fields?: DataTablePlusFields;
|
|
53
56
|
search?: SearchInputProps | boolean;
|
|
54
57
|
pagination?: Omit<PaginationProps, 'page' | 'pageSize'> | boolean;
|
|
58
|
+
columnsFilterOptions?: (filters: DataTableFilterState) => Record<string, any>;
|
|
59
|
+
columnsSorterOptions?: (sorters: Record<string, DataTableSortState>) => Record<string, any>;
|
|
55
60
|
dataTableProps?: DataTableProps;
|
|
56
61
|
customStyle?: CSSProperties;
|
|
57
62
|
customClass?: string;
|
|
@@ -17,6 +17,7 @@ export type PresetFormOptions<V extends Record<string, any> = Record<string, any
|
|
|
17
17
|
rules?: FormRules | FormItemRule | FormItemRule[];
|
|
18
18
|
required?: boolean;
|
|
19
19
|
collapsed?: boolean;
|
|
20
|
+
hidden?: boolean;
|
|
20
21
|
gridSpan?: string | number;
|
|
21
22
|
gridItemProps?: GridItemProps;
|
|
22
23
|
render?: (refs: PresetFormExposeRefs<V>, actions: PresetFormExposeActions<V>) => VNode | null;
|
|
@@ -4,7 +4,7 @@ export type RObject = Record<string, any>;
|
|
|
4
4
|
export type RemoteRequestFields = Partial<Record<string, string>>;
|
|
5
5
|
export interface RemoteRequestProps<P extends RObject, D extends RObject> {
|
|
6
6
|
api: (...args: P[]) => Promise<D>;
|
|
7
|
-
defaultParams?: P
|
|
7
|
+
defaultParams?: Partial<P>;
|
|
8
8
|
manual?: boolean;
|
|
9
9
|
fields?: RemoteRequestFields;
|
|
10
10
|
requestOptions?: UseRequestOptions<D, P[]>;
|