@antdv-vue/pro-table 0.0.0-stage → 2.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/CHANGELOG.md +255 -0
- package/README.md +106 -2
- package/dist/InternalTable.d.ts +360 -0
- package/dist/InternalTable.js +444 -0
- package/dist/RenderTypings.d.ts +33 -0
- package/dist/RenderTypings.js +1 -0
- package/dist/ResizableTableTitle.d.ts +24 -0
- package/dist/ResizableTableTitle.js +89 -0
- package/dist/Store/Provide.d.ts +68 -0
- package/dist/Store/Provide.js +132 -0
- package/dist/Table.d.ts +363 -0
- package/dist/Table.js +151 -0
- package/dist/TableRender.d.ts +54 -0
- package/dist/TableRender.js +295 -0
- package/dist/components/Alert/index.d.ts +45 -0
- package/dist/components/Alert/index.js +94 -0
- package/dist/components/Alert/style/index.d.ts +8 -0
- package/dist/components/Alert/style/index.js +11 -0
- package/dist/components/ColumnSetting/CheckboxList.d.ts +24 -0
- package/dist/components/ColumnSetting/CheckboxList.js +138 -0
- package/dist/components/ColumnSetting/CheckboxListItem.d.ts +17 -0
- package/dist/components/ColumnSetting/CheckboxListItem.js +84 -0
- package/dist/components/ColumnSetting/GroupCheckboxList.d.ts +22 -0
- package/dist/components/ColumnSetting/GroupCheckboxList.js +82 -0
- package/dist/components/ColumnSetting/ToolTipIcon.d.ts +12 -0
- package/dist/components/ColumnSetting/ToolTipIcon.js +47 -0
- package/dist/components/ColumnSetting/index.d.ts +26 -0
- package/dist/components/ColumnSetting/index.js +117 -0
- package/dist/components/ColumnSetting/style/index.d.ts +8 -0
- package/dist/components/ColumnSetting/style/index.js +73 -0
- package/dist/components/DragSortTable/index.d.ts +375 -0
- package/dist/components/DragSortTable/index.js +166 -0
- package/dist/components/DragSortTable/style/index.d.ts +8 -0
- package/dist/components/DragSortTable/style/index.js +25 -0
- package/dist/components/Dropdown/Button.d.ts +20 -0
- package/dist/components/Dropdown/Button.js +155 -0
- package/dist/components/Dropdown/index.d.ts +27 -0
- package/dist/components/Dropdown/index.js +149 -0
- package/dist/components/EditableTable/CellEditorTable.d.ts +63 -0
- package/dist/components/EditableTable/CellEditorTable.js +167 -0
- package/dist/components/EditableTable/EditableTable.d.ts +67 -0
- package/dist/components/EditableTable/EditableTable.js +141 -0
- package/dist/components/EditableTable/InternalEditableTable.d.ts +189 -0
- package/dist/components/EditableTable/InternalEditableTable.js +508 -0
- package/dist/components/EditableTable/RowEditorTable.d.ts +63 -0
- package/dist/components/EditableTable/RowEditorTable.js +147 -0
- package/dist/components/EditableTable/context.d.ts +9 -0
- package/dist/components/EditableTable/context.js +11 -0
- package/dist/components/EditableTable/index.d.ts +5 -0
- package/dist/components/EditableTable/index.js +5 -0
- package/dist/components/Form/FormRender.d.ts +77 -0
- package/dist/components/Form/FormRender.js +198 -0
- package/dist/components/Form/index.d.ts +33 -0
- package/dist/components/Form/index.js +91 -0
- package/dist/components/ToolBar/DensityIcon.d.ts +22 -0
- package/dist/components/ToolBar/DensityIcon.js +71 -0
- package/dist/components/ToolBar/FullScreenIcon.d.ts +6 -0
- package/dist/components/ToolBar/FullScreenIcon.js +30 -0
- package/dist/components/ToolBar/HeaderMenu.d.ts +22 -0
- package/dist/components/ToolBar/HeaderMenu.js +84 -0
- package/dist/components/ToolBar/index.d.ts +102 -0
- package/dist/components/ToolBar/index.js +322 -0
- package/dist/components/ToolBar/style/index.d.ts +8 -0
- package/dist/components/ToolBar/style/index.js +116 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +10 -0
- package/dist/pro-table.esm.js +3274 -0
- package/dist/style/index.d.ts +11 -0
- package/dist/style/index.js +162 -0
- package/dist/typing.d.ts +409 -0
- package/dist/typing.js +1 -0
- package/dist/useFetchData.d.ts +10 -0
- package/dist/useFetchData.js +243 -0
- package/dist/utils/cellRenderToFromItem.d.ts +52 -0
- package/dist/utils/cellRenderToFromItem.js +163 -0
- package/dist/utils/columnRender.d.ts +54 -0
- package/dist/utils/columnRender.js +148 -0
- package/dist/utils/columnSort.d.ts +7 -0
- package/dist/utils/columnSort.js +17 -0
- package/dist/utils/genProColumnsToColumns.d.ts +69 -0
- package/dist/utils/genProColumnsToColumns.js +197 -0
- package/dist/utils/index.d.ts +122 -0
- package/dist/utils/index.js +227 -0
- package/dist/utils/useDragSort.d.ts +182 -0
- package/dist/utils/useDragSort.js +162 -0
- package/package.json +67 -3
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { DensitySize } from "../ToolBar/DensityIcon.js";
|
|
2
|
+
import { SearchConfig } from "../Form/FormRender.js";
|
|
3
|
+
import { ErrorBoundaryRender, OptionsRender, TableAlertRender, ToolBarRender } from "../../RenderTypings.js";
|
|
4
|
+
import { BaseToolbarProps, OptionConfig } from "../ToolBar/index.js";
|
|
5
|
+
import { Bordered, ColumnStateType, FilterValue, ProColumns, ProTableProps, RequestData } from "../../typing.js";
|
|
6
|
+
import * as _$vue from "vue";
|
|
7
|
+
import * as _$_antdv_vue_pro_form0 from "@antdv-vue/pro-form";
|
|
8
|
+
import { ParamsType } from "@antdv-vue/pro-provider";
|
|
9
|
+
import * as _$_antdv_vue_pro_utils0 from "@antdv-vue/pro-utils";
|
|
10
|
+
import { ProFieldValueObjectType, ProFieldValueType } from "@antdv-vue/pro-utils";
|
|
11
|
+
import { VueNode as VueNode$1 } from "@v-c/util";
|
|
12
|
+
import * as _$antdv_next0 from "antdv-next";
|
|
13
|
+
import * as _$_antdv_vue_pro_field0 from "@antdv-vue/pro-field";
|
|
14
|
+
import * as _$_antdv_vue_pro_card0 from "@antdv-vue/pro-card";
|
|
15
|
+
import * as _$antdv_next_dist_form_FormItemLabel0 from "antdv-next/dist/form/FormItemLabel";
|
|
16
|
+
import * as _$antdv_next_dist_form_types0 from "antdv-next/dist/form/types";
|
|
17
|
+
import * as _$antdv_next_dist_table_interface0 from "antdv-next/dist/table/interface";
|
|
18
|
+
import * as _$dayjs from "dayjs";
|
|
19
|
+
import * as _$_antdv_vue_pro_form_dist_typing0 from "@antdv-vue/pro-form/dist/typing";
|
|
20
|
+
import * as _$_antdv_vue_pro_form_dist_layouts_QueryFilter_Actions0 from "@antdv-vue/pro-form/dist/layouts/QueryFilter/Actions";
|
|
21
|
+
import * as _$_antdv_vue_pro_form_dist_layouts_QueryFilter_index0 from "@antdv-vue/pro-form/dist/layouts/QueryFilter/index";
|
|
22
|
+
import * as _$_antdv_vue_pro_form_dist_RenderTypings0 from "@antdv-vue/pro-form/dist/RenderTypings";
|
|
23
|
+
|
|
24
|
+
//#region src/components/DragSortTable/index.d.ts
|
|
25
|
+
type DragSortProTableProps<T, U, ValueType> = ProTableProps<T, U, ValueType> & {
|
|
26
|
+
/** @name dragSortKey 拖动排序列key值 如配置此参数,则会在该 key 对应的行显示拖拽排序把手,允许拖拽排序 */dragSortKey?: string; /** @name dragSortHandlerRender 渲染自定义拖动排序把手的函数 如配置了 dragSortKey 但未配置此参数,则使用默认把手图标 */
|
|
27
|
+
dragSortHandlerRender?: (rowData: Record<string, any>, idx: number) => VueNode$1; /** @name onDragSortEnd 拖动排序完成回调 */
|
|
28
|
+
onDragSortEnd?: (beforeIndex?: number | string, afterIndex?: number | string, newDataSource?: Record<string, any>[]) => Promise<void> | void;
|
|
29
|
+
};
|
|
30
|
+
declare const DragSortProTable: new <DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType extends (ProFieldValueType | ProFieldValueObjectType) = "text">(props: {
|
|
31
|
+
dataSource?: DataType[] | undefined;
|
|
32
|
+
size?: DensitySize;
|
|
33
|
+
columns?: ProColumns<DataType, ValueType>[] | undefined;
|
|
34
|
+
toolbar?: BaseToolbarProps;
|
|
35
|
+
ghost?: boolean;
|
|
36
|
+
params?: Params | undefined;
|
|
37
|
+
columnsState?: ColumnStateType;
|
|
38
|
+
onSizeChange?: (size: DensitySize) => void;
|
|
39
|
+
cardProps?: _$_antdv_vue_pro_card0.ProCardProps | false;
|
|
40
|
+
tableRender?: ((props: ProTableProps<DataType, Params, ValueType>, defaultDom: VueNode$1, domList: {
|
|
41
|
+
toolbar: VueNode$1;
|
|
42
|
+
alert: VueNode$1;
|
|
43
|
+
table: VueNode$1;
|
|
44
|
+
}) => VueNode$1) | undefined;
|
|
45
|
+
tableViewRender?: ((props: _$antdv_next0.TableProps<DataType> & {
|
|
46
|
+
class?: string;
|
|
47
|
+
style?: _$vue.CSSProperties;
|
|
48
|
+
onChange?: ((changePagination: _$antdv_next0.TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: _$antdv_next0.TableSorterResult<DataType> | _$antdv_next0.TableSorterResult<DataType>[], extra: _$antdv_next_dist_table_interface0.TableCurrentDataSource<DataType>) => void) | undefined;
|
|
49
|
+
}, defaultDom: VueNode$1) => VueNode$1) | undefined;
|
|
50
|
+
tableExtraRender?: ((props: ProTableProps<DataType, Params, ValueType>, dataSource: DataType[]) => VueNode$1) | undefined;
|
|
51
|
+
onChange?: ((pagination: _$antdv_next0.TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: _$antdv_next0.TableSorterResult<DataType> | _$antdv_next0.TableSorterResult<DataType>[], extra: _$antdv_next_dist_table_interface0.TableCurrentDataSource<DataType>) => void) | undefined;
|
|
52
|
+
searchFormRender?: ((props: ProTableProps<DataType, Params, ValueType>, defaultDom: VueNode$1) => _$vue.VNode) | undefined;
|
|
53
|
+
request?: ((params: Params & {
|
|
54
|
+
pageSize?: number;
|
|
55
|
+
current?: number;
|
|
56
|
+
keyword?: string;
|
|
57
|
+
}, sort: Record<string, _$antdv_next0.TableSortOrder>, filter: Record<string, FilterValue>) => Promise<Partial<RequestData<DataType>>>) | undefined;
|
|
58
|
+
postData?: ((dataSource: DataType[]) => DataType[]) | undefined;
|
|
59
|
+
defaultData?: DataType[] | undefined;
|
|
60
|
+
toolBarRender?: _$_antdv_vue_pro_utils0.WithFalse<ToolBarRender<DataType> | undefined>;
|
|
61
|
+
optionsRender?: OptionsRender<DataType, ValueType> | undefined;
|
|
62
|
+
onLoad?: ((dataSource: DataType[]) => void) | undefined;
|
|
63
|
+
onLoadingChange?: (loading: boolean | _$antdv_next0.SpinProps | undefined) => void;
|
|
64
|
+
onRequestError?: (e: Error) => void;
|
|
65
|
+
polling?: number | ((dataSource: DataType[]) => number) | undefined;
|
|
66
|
+
tableClass?: string;
|
|
67
|
+
tableStyle?: _$vue.CSSProperties;
|
|
68
|
+
headerTitle?: VueNode$1;
|
|
69
|
+
tooltip?: string | _$antdv_next_dist_form_FormItemLabel0.FormItemTooltipType;
|
|
70
|
+
options?: _$_antdv_vue_pro_utils0.WithFalse<OptionConfig<DataType, ValueType>> | undefined;
|
|
71
|
+
search?: _$_antdv_vue_pro_utils0.WithFalse<SearchConfig>;
|
|
72
|
+
form?: Omit<Omit<_$antdv_next0.FormProps, "onReset" | "onFinish"> & _$_antdv_vue_pro_form_dist_typing0.ProFormGridConfig & {
|
|
73
|
+
submitter?: _$_antdv_vue_pro_form_dist_typing0.WithFalse<_$_antdv_vue_pro_form0.SubmitterProps<{
|
|
74
|
+
form?: _$antdv_next0.FormInstance;
|
|
75
|
+
}>>;
|
|
76
|
+
onFinish?: ((formData: DataType) => Promise<boolean | void> | void) | undefined;
|
|
77
|
+
loading?: boolean;
|
|
78
|
+
onLoadingChange?: (loading: boolean) => void;
|
|
79
|
+
formRef?: _$vue.ShallowRef<_$_antdv_vue_pro_form0.ProFormRef<DataType> | null> | undefined;
|
|
80
|
+
syncToUrl?: boolean | ((values: DataType & Record<string, any>, type: "get" | "set") => DataType) | undefined;
|
|
81
|
+
syncToUrlAsImportant?: boolean;
|
|
82
|
+
extraUrlParams?: Record<string, any>;
|
|
83
|
+
syncToModel?: boolean;
|
|
84
|
+
omitNil?: boolean;
|
|
85
|
+
dateFormatter?: _$_antdv_vue_pro_form_dist_typing0.WithFalse<(string & {}) | "string" | "number" | ((value: _$dayjs.Dayjs, valueType: string) => string | number)>;
|
|
86
|
+
onInit?: ((values: DataType, form: _$_antdv_vue_pro_form0.ProFormInstance<DataType>) => void) | undefined;
|
|
87
|
+
params?: Params | undefined;
|
|
88
|
+
request?: _$_antdv_vue_pro_utils0.ProRequestData<DataType, Params> | undefined;
|
|
89
|
+
isKeyPressSubmit?: boolean;
|
|
90
|
+
formKey?: string | number;
|
|
91
|
+
autoFocusFirstInput?: boolean;
|
|
92
|
+
readonly?: boolean;
|
|
93
|
+
} & {
|
|
94
|
+
onReset?: ((vaules?: DataType | undefined) => void) | undefined;
|
|
95
|
+
} & Omit<_$_antdv_vue_pro_form_dist_layouts_QueryFilter_Actions0.ActionsProps, "submitter" | "setCollapsed" | "isForm"> & {
|
|
96
|
+
defaultCollapsed?: boolean;
|
|
97
|
+
layout?: _$antdv_next0.FormProps["layout"];
|
|
98
|
+
defaultColsNumber?: number;
|
|
99
|
+
defaultFormItemsNumber?: number;
|
|
100
|
+
labelWidth?: number | "auto";
|
|
101
|
+
split?: boolean;
|
|
102
|
+
span?: _$_antdv_vue_pro_form_dist_layouts_QueryFilter_index0.SpanConfig;
|
|
103
|
+
searchText?: string;
|
|
104
|
+
resetText?: string;
|
|
105
|
+
searchGutter?: _$antdv_next0.RowProps["gutter"];
|
|
106
|
+
optionRender?: _$_antdv_vue_pro_form_dist_RenderTypings0.OptionRender;
|
|
107
|
+
ignoreRules?: boolean;
|
|
108
|
+
showHiddenNum?: boolean;
|
|
109
|
+
submitterColSpanProps?: Omit<_$antdv_next0.ColProps, "span"> & {
|
|
110
|
+
span?: number;
|
|
111
|
+
class?: string;
|
|
112
|
+
style?: _$vue.CSSProperties;
|
|
113
|
+
};
|
|
114
|
+
containerStyle?: _$vue.CSSProperties;
|
|
115
|
+
} & {
|
|
116
|
+
onReset?: ((values?: DataType | undefined) => void) | undefined;
|
|
117
|
+
}, "form"> | undefined;
|
|
118
|
+
dateFormatter?: (string & {}) | "string" | "number" | ((value: _$dayjs.Dayjs, valueType: string) => string | number) | false;
|
|
119
|
+
beforeSearchSubmit?: ((params: Partial<Params>) => any) | undefined;
|
|
120
|
+
tableAlertRender?: TableAlertRender<DataType> | undefined;
|
|
121
|
+
tableAlertOptionRender?: TableAlertRender<DataType> | undefined;
|
|
122
|
+
rowSelection?: false | (_$antdv_next0.TableRowSelection<DataType> & {
|
|
123
|
+
alwaysShowAlert?: boolean;
|
|
124
|
+
}) | undefined;
|
|
125
|
+
type?: _$_antdv_vue_pro_utils0.ProSchemaComponentTypes;
|
|
126
|
+
onSubmit?: ((params?: Params | undefined) => void) | undefined;
|
|
127
|
+
onReset?: ((params?: Params | undefined) => void) | undefined;
|
|
128
|
+
columnEmptyText?: _$_antdv_vue_pro_field0.ProFieldEmptyText;
|
|
129
|
+
manualRequest?: boolean;
|
|
130
|
+
editable?: _$_antdv_vue_pro_utils0.RowEditableConfig<DataType> | undefined;
|
|
131
|
+
onDataSourceChange?: ((dataSource: DataType[]) => void) | undefined;
|
|
132
|
+
cardBordered?: Bordered;
|
|
133
|
+
debounceTime?: number;
|
|
134
|
+
revalidateOnFocus?: boolean;
|
|
135
|
+
defaultSize?: DensitySize;
|
|
136
|
+
name?: _$antdv_next_dist_form_types0.NamePath<string | number | boolean>;
|
|
137
|
+
errorBoundaryRender?: ErrorBoundaryRender;
|
|
138
|
+
} & Omit<_$antdv_next0.TableProps<DataType>, "size" | "columns" | "rowSelection" | "dataSource"> & {
|
|
139
|
+
/** @name dragSortKey 拖动排序列key值 如配置此参数,则会在该 key 对应的行显示拖拽排序把手,允许拖拽排序 */dragSortKey?: string; /** @name dragSortHandlerRender 渲染自定义拖动排序把手的函数 如配置了 dragSortKey 但未配置此参数,则使用默认把手图标 */
|
|
140
|
+
dragSortHandlerRender?: (rowData: Record<string, any>, idx: number) => VueNode$1; /** @name onDragSortEnd 拖动排序完成回调 */
|
|
141
|
+
onDragSortEnd?: (beforeIndex?: number | string, afterIndex?: number | string, newDataSource?: Record<string, any>[]) => Promise<void> | void;
|
|
142
|
+
} & {} & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps) => _$vue.CreateComponentPublicInstanceWithMixins<{
|
|
143
|
+
dataSource?: DataType[] | undefined;
|
|
144
|
+
size?: DensitySize;
|
|
145
|
+
columns?: ProColumns<DataType, ValueType>[] | undefined;
|
|
146
|
+
toolbar?: BaseToolbarProps;
|
|
147
|
+
ghost?: boolean;
|
|
148
|
+
params?: Params | undefined;
|
|
149
|
+
columnsState?: ColumnStateType;
|
|
150
|
+
onSizeChange?: (size: DensitySize) => void;
|
|
151
|
+
cardProps?: _$_antdv_vue_pro_card0.ProCardProps | false;
|
|
152
|
+
tableRender?: ((props: ProTableProps<DataType, Params, ValueType>, defaultDom: VueNode$1, domList: {
|
|
153
|
+
toolbar: VueNode$1;
|
|
154
|
+
alert: VueNode$1;
|
|
155
|
+
table: VueNode$1;
|
|
156
|
+
}) => VueNode$1) | undefined;
|
|
157
|
+
tableViewRender?: ((props: _$antdv_next0.TableProps<DataType> & {
|
|
158
|
+
class?: string;
|
|
159
|
+
style?: _$vue.CSSProperties;
|
|
160
|
+
onChange?: ((changePagination: _$antdv_next0.TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: _$antdv_next0.TableSorterResult<DataType> | _$antdv_next0.TableSorterResult<DataType>[], extra: _$antdv_next_dist_table_interface0.TableCurrentDataSource<DataType>) => void) | undefined;
|
|
161
|
+
}, defaultDom: VueNode$1) => VueNode$1) | undefined;
|
|
162
|
+
tableExtraRender?: ((props: ProTableProps<DataType, Params, ValueType>, dataSource: DataType[]) => VueNode$1) | undefined;
|
|
163
|
+
onChange?: ((pagination: _$antdv_next0.TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: _$antdv_next0.TableSorterResult<DataType> | _$antdv_next0.TableSorterResult<DataType>[], extra: _$antdv_next_dist_table_interface0.TableCurrentDataSource<DataType>) => void) | undefined;
|
|
164
|
+
searchFormRender?: ((props: ProTableProps<DataType, Params, ValueType>, defaultDom: VueNode$1) => _$vue.VNode) | undefined;
|
|
165
|
+
request?: ((params: Params & {
|
|
166
|
+
pageSize?: number;
|
|
167
|
+
current?: number;
|
|
168
|
+
keyword?: string;
|
|
169
|
+
}, sort: Record<string, _$antdv_next0.TableSortOrder>, filter: Record<string, FilterValue>) => Promise<Partial<RequestData<DataType>>>) | undefined;
|
|
170
|
+
postData?: ((dataSource: DataType[]) => DataType[]) | undefined;
|
|
171
|
+
defaultData?: DataType[] | undefined;
|
|
172
|
+
toolBarRender?: _$_antdv_vue_pro_utils0.WithFalse<ToolBarRender<DataType> | undefined>;
|
|
173
|
+
optionsRender?: OptionsRender<DataType, ValueType> | undefined;
|
|
174
|
+
onLoad?: ((dataSource: DataType[]) => void) | undefined;
|
|
175
|
+
onLoadingChange?: (loading: boolean | _$antdv_next0.SpinProps | undefined) => void;
|
|
176
|
+
onRequestError?: (e: Error) => void;
|
|
177
|
+
polling?: number | ((dataSource: DataType[]) => number) | undefined;
|
|
178
|
+
tableClass?: string;
|
|
179
|
+
tableStyle?: _$vue.CSSProperties;
|
|
180
|
+
headerTitle?: VueNode$1;
|
|
181
|
+
tooltip?: string | _$antdv_next_dist_form_FormItemLabel0.FormItemTooltipType;
|
|
182
|
+
options?: _$_antdv_vue_pro_utils0.WithFalse<OptionConfig<DataType, ValueType>> | undefined;
|
|
183
|
+
search?: _$_antdv_vue_pro_utils0.WithFalse<SearchConfig>;
|
|
184
|
+
form?: Omit<Omit<_$antdv_next0.FormProps, "onReset" | "onFinish"> & _$_antdv_vue_pro_form_dist_typing0.ProFormGridConfig & {
|
|
185
|
+
submitter?: _$_antdv_vue_pro_form_dist_typing0.WithFalse<_$_antdv_vue_pro_form0.SubmitterProps<{
|
|
186
|
+
form?: _$antdv_next0.FormInstance;
|
|
187
|
+
}>>;
|
|
188
|
+
onFinish?: ((formData: DataType) => Promise<boolean | void> | void) | undefined;
|
|
189
|
+
loading?: boolean;
|
|
190
|
+
onLoadingChange?: (loading: boolean) => void;
|
|
191
|
+
formRef?: _$vue.ShallowRef<_$_antdv_vue_pro_form0.ProFormRef<DataType> | null> | undefined;
|
|
192
|
+
syncToUrl?: boolean | ((values: DataType & Record<string, any>, type: "get" | "set") => DataType) | undefined;
|
|
193
|
+
syncToUrlAsImportant?: boolean;
|
|
194
|
+
extraUrlParams?: Record<string, any>;
|
|
195
|
+
syncToModel?: boolean;
|
|
196
|
+
omitNil?: boolean;
|
|
197
|
+
dateFormatter?: _$_antdv_vue_pro_form_dist_typing0.WithFalse<(string & {}) | "string" | "number" | ((value: _$dayjs.Dayjs, valueType: string) => string | number)>;
|
|
198
|
+
onInit?: ((values: DataType, form: _$_antdv_vue_pro_form0.ProFormInstance<DataType>) => void) | undefined;
|
|
199
|
+
params?: Params | undefined;
|
|
200
|
+
request?: _$_antdv_vue_pro_utils0.ProRequestData<DataType, Params> | undefined;
|
|
201
|
+
isKeyPressSubmit?: boolean;
|
|
202
|
+
formKey?: string | number;
|
|
203
|
+
autoFocusFirstInput?: boolean;
|
|
204
|
+
readonly?: boolean;
|
|
205
|
+
} & {
|
|
206
|
+
onReset?: ((vaules?: DataType | undefined) => void) | undefined;
|
|
207
|
+
} & Omit<_$_antdv_vue_pro_form_dist_layouts_QueryFilter_Actions0.ActionsProps, "submitter" | "setCollapsed" | "isForm"> & {
|
|
208
|
+
defaultCollapsed?: boolean;
|
|
209
|
+
layout?: _$antdv_next0.FormProps["layout"];
|
|
210
|
+
defaultColsNumber?: number;
|
|
211
|
+
defaultFormItemsNumber?: number;
|
|
212
|
+
labelWidth?: number | "auto";
|
|
213
|
+
split?: boolean;
|
|
214
|
+
span?: _$_antdv_vue_pro_form_dist_layouts_QueryFilter_index0.SpanConfig;
|
|
215
|
+
searchText?: string;
|
|
216
|
+
resetText?: string;
|
|
217
|
+
searchGutter?: _$antdv_next0.RowProps["gutter"];
|
|
218
|
+
optionRender?: _$_antdv_vue_pro_form_dist_RenderTypings0.OptionRender;
|
|
219
|
+
ignoreRules?: boolean;
|
|
220
|
+
showHiddenNum?: boolean;
|
|
221
|
+
submitterColSpanProps?: Omit<_$antdv_next0.ColProps, "span"> & {
|
|
222
|
+
span?: number;
|
|
223
|
+
class?: string;
|
|
224
|
+
style?: _$vue.CSSProperties;
|
|
225
|
+
};
|
|
226
|
+
containerStyle?: _$vue.CSSProperties;
|
|
227
|
+
} & {
|
|
228
|
+
onReset?: ((values?: DataType | undefined) => void) | undefined;
|
|
229
|
+
}, "form"> | undefined;
|
|
230
|
+
dateFormatter?: (string & {}) | "string" | "number" | ((value: _$dayjs.Dayjs, valueType: string) => string | number) | false;
|
|
231
|
+
beforeSearchSubmit?: ((params: Partial<Params>) => any) | undefined;
|
|
232
|
+
tableAlertRender?: TableAlertRender<DataType> | undefined;
|
|
233
|
+
tableAlertOptionRender?: TableAlertRender<DataType> | undefined;
|
|
234
|
+
rowSelection?: false | (_$antdv_next0.TableRowSelection<DataType> & {
|
|
235
|
+
alwaysShowAlert?: boolean;
|
|
236
|
+
}) | undefined;
|
|
237
|
+
type?: _$_antdv_vue_pro_utils0.ProSchemaComponentTypes;
|
|
238
|
+
onSubmit?: ((params?: Params | undefined) => void) | undefined;
|
|
239
|
+
onReset?: ((params?: Params | undefined) => void) | undefined;
|
|
240
|
+
columnEmptyText?: _$_antdv_vue_pro_field0.ProFieldEmptyText;
|
|
241
|
+
manualRequest?: boolean;
|
|
242
|
+
editable?: _$_antdv_vue_pro_utils0.RowEditableConfig<DataType> | undefined;
|
|
243
|
+
onDataSourceChange?: ((dataSource: DataType[]) => void) | undefined;
|
|
244
|
+
cardBordered?: Bordered;
|
|
245
|
+
debounceTime?: number;
|
|
246
|
+
revalidateOnFocus?: boolean;
|
|
247
|
+
defaultSize?: DensitySize;
|
|
248
|
+
name?: _$antdv_next_dist_form_types0.NamePath<string | number | boolean>;
|
|
249
|
+
errorBoundaryRender?: ErrorBoundaryRender;
|
|
250
|
+
} & Omit<_$antdv_next0.TableProps<DataType>, "size" | "columns" | "rowSelection" | "dataSource"> & {
|
|
251
|
+
/** @name dragSortKey 拖动排序列key值 如配置此参数,则会在该 key 对应的行显示拖拽排序把手,允许拖拽排序 */dragSortKey?: string; /** @name dragSortHandlerRender 渲染自定义拖动排序把手的函数 如配置了 dragSortKey 但未配置此参数,则使用默认把手图标 */
|
|
252
|
+
dragSortHandlerRender?: (rowData: Record<string, any>, idx: number) => VueNode$1; /** @name onDragSortEnd 拖动排序完成回调 */
|
|
253
|
+
onDragSortEnd?: (beforeIndex?: number | string, afterIndex?: number | string, newDataSource?: Record<string, any>[]) => Promise<void> | void;
|
|
254
|
+
} & {}, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, _$vue.PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, _$vue.ComponentProvideOptions, {
|
|
255
|
+
P: {};
|
|
256
|
+
B: {};
|
|
257
|
+
D: {};
|
|
258
|
+
C: {};
|
|
259
|
+
M: {};
|
|
260
|
+
Defaults: {};
|
|
261
|
+
}, {
|
|
262
|
+
dataSource?: DataType[] | undefined;
|
|
263
|
+
size?: DensitySize;
|
|
264
|
+
columns?: ProColumns<DataType, ValueType>[] | undefined;
|
|
265
|
+
toolbar?: BaseToolbarProps;
|
|
266
|
+
ghost?: boolean;
|
|
267
|
+
params?: Params | undefined;
|
|
268
|
+
columnsState?: ColumnStateType;
|
|
269
|
+
onSizeChange?: (size: DensitySize) => void;
|
|
270
|
+
cardProps?: _$_antdv_vue_pro_card0.ProCardProps | false;
|
|
271
|
+
tableRender?: ((props: ProTableProps<DataType, Params, ValueType>, defaultDom: VueNode$1, domList: {
|
|
272
|
+
toolbar: VueNode$1;
|
|
273
|
+
alert: VueNode$1;
|
|
274
|
+
table: VueNode$1;
|
|
275
|
+
}) => VueNode$1) | undefined;
|
|
276
|
+
tableViewRender?: ((props: _$antdv_next0.TableProps<DataType> & {
|
|
277
|
+
class?: string;
|
|
278
|
+
style?: _$vue.CSSProperties;
|
|
279
|
+
onChange?: ((changePagination: _$antdv_next0.TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: _$antdv_next0.TableSorterResult<DataType> | _$antdv_next0.TableSorterResult<DataType>[], extra: _$antdv_next_dist_table_interface0.TableCurrentDataSource<DataType>) => void) | undefined;
|
|
280
|
+
}, defaultDom: VueNode$1) => VueNode$1) | undefined;
|
|
281
|
+
tableExtraRender?: ((props: ProTableProps<DataType, Params, ValueType>, dataSource: DataType[]) => VueNode$1) | undefined;
|
|
282
|
+
onChange?: ((pagination: _$antdv_next0.TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: _$antdv_next0.TableSorterResult<DataType> | _$antdv_next0.TableSorterResult<DataType>[], extra: _$antdv_next_dist_table_interface0.TableCurrentDataSource<DataType>) => void) | undefined;
|
|
283
|
+
searchFormRender?: ((props: ProTableProps<DataType, Params, ValueType>, defaultDom: VueNode$1) => _$vue.VNode) | undefined;
|
|
284
|
+
request?: ((params: Params & {
|
|
285
|
+
pageSize?: number;
|
|
286
|
+
current?: number;
|
|
287
|
+
keyword?: string;
|
|
288
|
+
}, sort: Record<string, _$antdv_next0.TableSortOrder>, filter: Record<string, FilterValue>) => Promise<Partial<RequestData<DataType>>>) | undefined;
|
|
289
|
+
postData?: ((dataSource: DataType[]) => DataType[]) | undefined;
|
|
290
|
+
defaultData?: DataType[] | undefined;
|
|
291
|
+
toolBarRender?: _$_antdv_vue_pro_utils0.WithFalse<ToolBarRender<DataType> | undefined>;
|
|
292
|
+
optionsRender?: OptionsRender<DataType, ValueType> | undefined;
|
|
293
|
+
onLoad?: ((dataSource: DataType[]) => void) | undefined;
|
|
294
|
+
onLoadingChange?: (loading: boolean | _$antdv_next0.SpinProps | undefined) => void;
|
|
295
|
+
onRequestError?: (e: Error) => void;
|
|
296
|
+
polling?: number | ((dataSource: DataType[]) => number) | undefined;
|
|
297
|
+
tableClass?: string;
|
|
298
|
+
tableStyle?: _$vue.CSSProperties;
|
|
299
|
+
headerTitle?: VueNode$1;
|
|
300
|
+
tooltip?: string | _$antdv_next_dist_form_FormItemLabel0.FormItemTooltipType;
|
|
301
|
+
options?: _$_antdv_vue_pro_utils0.WithFalse<OptionConfig<DataType, ValueType>> | undefined;
|
|
302
|
+
search?: _$_antdv_vue_pro_utils0.WithFalse<SearchConfig>;
|
|
303
|
+
form?: Omit<Omit<_$antdv_next0.FormProps, "onReset" | "onFinish"> & _$_antdv_vue_pro_form_dist_typing0.ProFormGridConfig & {
|
|
304
|
+
submitter?: _$_antdv_vue_pro_form_dist_typing0.WithFalse<_$_antdv_vue_pro_form0.SubmitterProps<{
|
|
305
|
+
form?: _$antdv_next0.FormInstance;
|
|
306
|
+
}>>;
|
|
307
|
+
onFinish?: ((formData: DataType) => Promise<boolean | void> | void) | undefined;
|
|
308
|
+
loading?: boolean;
|
|
309
|
+
onLoadingChange?: (loading: boolean) => void;
|
|
310
|
+
formRef?: _$vue.ShallowRef<_$_antdv_vue_pro_form0.ProFormRef<DataType> | null> | undefined;
|
|
311
|
+
syncToUrl?: boolean | ((values: DataType & Record<string, any>, type: "get" | "set") => DataType) | undefined;
|
|
312
|
+
syncToUrlAsImportant?: boolean;
|
|
313
|
+
extraUrlParams?: Record<string, any>;
|
|
314
|
+
syncToModel?: boolean;
|
|
315
|
+
omitNil?: boolean;
|
|
316
|
+
dateFormatter?: _$_antdv_vue_pro_form_dist_typing0.WithFalse<(string & {}) | "string" | "number" | ((value: _$dayjs.Dayjs, valueType: string) => string | number)>;
|
|
317
|
+
onInit?: ((values: DataType, form: _$_antdv_vue_pro_form0.ProFormInstance<DataType>) => void) | undefined;
|
|
318
|
+
params?: Params | undefined;
|
|
319
|
+
request?: _$_antdv_vue_pro_utils0.ProRequestData<DataType, Params> | undefined;
|
|
320
|
+
isKeyPressSubmit?: boolean;
|
|
321
|
+
formKey?: string | number;
|
|
322
|
+
autoFocusFirstInput?: boolean;
|
|
323
|
+
readonly?: boolean;
|
|
324
|
+
} & {
|
|
325
|
+
onReset?: ((vaules?: DataType | undefined) => void) | undefined;
|
|
326
|
+
} & Omit<_$_antdv_vue_pro_form_dist_layouts_QueryFilter_Actions0.ActionsProps, "submitter" | "setCollapsed" | "isForm"> & {
|
|
327
|
+
defaultCollapsed?: boolean;
|
|
328
|
+
layout?: _$antdv_next0.FormProps["layout"];
|
|
329
|
+
defaultColsNumber?: number;
|
|
330
|
+
defaultFormItemsNumber?: number;
|
|
331
|
+
labelWidth?: number | "auto";
|
|
332
|
+
split?: boolean;
|
|
333
|
+
span?: _$_antdv_vue_pro_form_dist_layouts_QueryFilter_index0.SpanConfig;
|
|
334
|
+
searchText?: string;
|
|
335
|
+
resetText?: string;
|
|
336
|
+
searchGutter?: _$antdv_next0.RowProps["gutter"];
|
|
337
|
+
optionRender?: _$_antdv_vue_pro_form_dist_RenderTypings0.OptionRender;
|
|
338
|
+
ignoreRules?: boolean;
|
|
339
|
+
showHiddenNum?: boolean;
|
|
340
|
+
submitterColSpanProps?: Omit<_$antdv_next0.ColProps, "span"> & {
|
|
341
|
+
span?: number;
|
|
342
|
+
class?: string;
|
|
343
|
+
style?: _$vue.CSSProperties;
|
|
344
|
+
};
|
|
345
|
+
containerStyle?: _$vue.CSSProperties;
|
|
346
|
+
} & {
|
|
347
|
+
onReset?: ((values?: DataType | undefined) => void) | undefined;
|
|
348
|
+
}, "form"> | undefined;
|
|
349
|
+
dateFormatter?: (string & {}) | "string" | "number" | ((value: _$dayjs.Dayjs, valueType: string) => string | number) | false;
|
|
350
|
+
beforeSearchSubmit?: ((params: Partial<Params>) => any) | undefined;
|
|
351
|
+
tableAlertRender?: TableAlertRender<DataType> | undefined;
|
|
352
|
+
tableAlertOptionRender?: TableAlertRender<DataType> | undefined;
|
|
353
|
+
rowSelection?: false | (_$antdv_next0.TableRowSelection<DataType> & {
|
|
354
|
+
alwaysShowAlert?: boolean;
|
|
355
|
+
}) | undefined;
|
|
356
|
+
type?: _$_antdv_vue_pro_utils0.ProSchemaComponentTypes;
|
|
357
|
+
onSubmit?: ((params?: Params | undefined) => void) | undefined;
|
|
358
|
+
onReset?: ((params?: Params | undefined) => void) | undefined;
|
|
359
|
+
columnEmptyText?: _$_antdv_vue_pro_field0.ProFieldEmptyText;
|
|
360
|
+
manualRequest?: boolean;
|
|
361
|
+
editable?: _$_antdv_vue_pro_utils0.RowEditableConfig<DataType> | undefined;
|
|
362
|
+
onDataSourceChange?: ((dataSource: DataType[]) => void) | undefined;
|
|
363
|
+
cardBordered?: Bordered;
|
|
364
|
+
debounceTime?: number;
|
|
365
|
+
revalidateOnFocus?: boolean;
|
|
366
|
+
defaultSize?: DensitySize;
|
|
367
|
+
name?: _$antdv_next_dist_form_types0.NamePath<string | number | boolean>;
|
|
368
|
+
errorBoundaryRender?: ErrorBoundaryRender;
|
|
369
|
+
} & Omit<_$antdv_next0.TableProps<DataType>, "size" | "columns" | "rowSelection" | "dataSource"> & {
|
|
370
|
+
/** @name dragSortKey 拖动排序列key值 如配置此参数,则会在该 key 对应的行显示拖拽排序把手,允许拖拽排序 */dragSortKey?: string; /** @name dragSortHandlerRender 渲染自定义拖动排序把手的函数 如配置了 dragSortKey 但未配置此参数,则使用默认把手图标 */
|
|
371
|
+
dragSortHandlerRender?: (rowData: Record<string, any>, idx: number) => VueNode$1; /** @name onDragSortEnd 拖动排序完成回调 */
|
|
372
|
+
onDragSortEnd?: (beforeIndex?: number | string, afterIndex?: number | string, newDataSource?: Record<string, any>[]) => Promise<void> | void;
|
|
373
|
+
} & {}, {}, {}, {}, {}, {}>;
|
|
374
|
+
//#endregion
|
|
375
|
+
export { DragSortProTableProps, DragSortProTable as default };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { useProTableInstanceExpose } from "../../utils/index.js";
|
|
2
|
+
import ProTable from "../../Table.js";
|
|
3
|
+
import { useDragSort } from "../../utils/useDragSort.js";
|
|
4
|
+
import style_default from "./style/index.js";
|
|
5
|
+
import { computed, createVNode, defineComponent, isVNode, mergeProps, shallowRef, toRef } from "vue";
|
|
6
|
+
import { useToken } from "@antdv-vue/pro-provider";
|
|
7
|
+
import { classNames, useMergedState } from "@v-c/util";
|
|
8
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
9
|
+
import { HolderOutlined } from "@antdv-next/icons";
|
|
10
|
+
//#region src/components/DragSortTable/index.tsx
|
|
11
|
+
function _isSlot(s) {
|
|
12
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
13
|
+
}
|
|
14
|
+
const DragSortProTable = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
|
|
15
|
+
const config = useConfig();
|
|
16
|
+
const tableRef = shallowRef(null);
|
|
17
|
+
const [dataSource, setDataSource] = useMergedState(() => props.defaultData || [], {
|
|
18
|
+
value: computed(() => props.dataSource),
|
|
19
|
+
onChange: props.onDataSourceChange
|
|
20
|
+
});
|
|
21
|
+
const { token } = useToken();
|
|
22
|
+
const prefixCls = computed(() => props.prefixCls || config.value.getPrefixCls("pro"));
|
|
23
|
+
const baseClassName = computed(() => `${prefixCls.value}-table-drag`);
|
|
24
|
+
const [hashId, cssVarCls] = style_default(baseClassName);
|
|
25
|
+
const DragHandle = (dragHandleProps) => {
|
|
26
|
+
const { rowData, index, className, ref: $ref, ...rest } = dragHandleProps;
|
|
27
|
+
const defaultDom = createVNode(HolderOutlined, mergeProps(rest, { "class": classNames(`${baseClassName.value}-icon`, className, hashId.value, cssVarCls.value) }), null);
|
|
28
|
+
const handle = props.dragSortHandlerRender ? props.dragSortHandlerRender(dragHandleProps?.rowData, dragHandleProps?.index) : defaultDom;
|
|
29
|
+
return createVNode("div", mergeProps({ "ref": $ref }, rest), [handle]);
|
|
30
|
+
};
|
|
31
|
+
const { DndContext, components } = useDragSort({
|
|
32
|
+
dataSource: computed(() => dataSource.value?.slice()),
|
|
33
|
+
dragSortKey: toRef(() => props.dragSortKey),
|
|
34
|
+
onDragSortEnd: props.onDragSortEnd,
|
|
35
|
+
token,
|
|
36
|
+
components: toRef(() => props.components),
|
|
37
|
+
rowKey: toRef(() => props.rowKey),
|
|
38
|
+
dragHandle: DragHandle
|
|
39
|
+
});
|
|
40
|
+
const wrapOnload = async (ds) => {
|
|
41
|
+
setDataSource(ds);
|
|
42
|
+
return props.onLoad?.(ds);
|
|
43
|
+
};
|
|
44
|
+
expose(useProTableInstanceExpose(tableRef));
|
|
45
|
+
return () => {
|
|
46
|
+
const { rowKey, dragSortKey, dragSortHandlerRender, onDragSortEnd, onDataSourceChange, defaultData, dataSource: originDataSource, onLoad, ...otherProps } = props;
|
|
47
|
+
return createVNode(ProTable, mergeProps(otherProps, {
|
|
48
|
+
"ref": tableRef,
|
|
49
|
+
"class": classNames(attrs.class, baseClassName.value, hashId.value, cssVarCls.value),
|
|
50
|
+
"columns": otherProps.columns?.map((item) => {
|
|
51
|
+
if (item.dataIndex === dragSortKey || item.key === dragSortKey) {
|
|
52
|
+
if (!item.render) item.render = () => null;
|
|
53
|
+
}
|
|
54
|
+
return item;
|
|
55
|
+
}),
|
|
56
|
+
"onLoad": wrapOnload,
|
|
57
|
+
"rowKey": rowKey,
|
|
58
|
+
"tableViewRender": (_, defaultDom) => createVNode(DndContext, null, _isSlot(defaultDom) ? defaultDom : { default: () => [defaultDom] }),
|
|
59
|
+
"components": components,
|
|
60
|
+
"dataSource": dataSource.value,
|
|
61
|
+
"onDataSourceChange": onDataSourceChange
|
|
62
|
+
}), slots);
|
|
63
|
+
};
|
|
64
|
+
}, {
|
|
65
|
+
name: "DragSortTable",
|
|
66
|
+
inheritAttrs: false,
|
|
67
|
+
props: [
|
|
68
|
+
"tableAlertRender",
|
|
69
|
+
"dragSortKey",
|
|
70
|
+
"dragSortHandlerRender",
|
|
71
|
+
"onDragSortEnd",
|
|
72
|
+
"tableAlertOptionRender",
|
|
73
|
+
"beforeSearchSubmit",
|
|
74
|
+
"columnEmptyText",
|
|
75
|
+
"editable",
|
|
76
|
+
"options",
|
|
77
|
+
"tooltip",
|
|
78
|
+
"search",
|
|
79
|
+
"headerTitle",
|
|
80
|
+
"tableStyle",
|
|
81
|
+
"toolBarRender",
|
|
82
|
+
"optionsRender",
|
|
83
|
+
"columnsState",
|
|
84
|
+
"onSizeChange",
|
|
85
|
+
"toolbar",
|
|
86
|
+
"bodyCell",
|
|
87
|
+
"bordered",
|
|
88
|
+
"caption",
|
|
89
|
+
"cardBordered",
|
|
90
|
+
"cardProps",
|
|
91
|
+
"childrenColumnName",
|
|
92
|
+
"classes",
|
|
93
|
+
"columns",
|
|
94
|
+
"components",
|
|
95
|
+
"dataSource",
|
|
96
|
+
"dateFormatter",
|
|
97
|
+
"debounceTime",
|
|
98
|
+
"defaultData",
|
|
99
|
+
"defaultExpandAllRows",
|
|
100
|
+
"defaultExpandedRowKeys",
|
|
101
|
+
"direction",
|
|
102
|
+
"dropdownPrefixCls",
|
|
103
|
+
"expandIcon",
|
|
104
|
+
"expandIconColumnIndex",
|
|
105
|
+
"expandRowByClick",
|
|
106
|
+
"expandable",
|
|
107
|
+
"expandedRowClassName",
|
|
108
|
+
"expandedRowKeys",
|
|
109
|
+
"expandedRowRender",
|
|
110
|
+
"footer",
|
|
111
|
+
"form",
|
|
112
|
+
"getContainerWidth",
|
|
113
|
+
"getPopupContainer",
|
|
114
|
+
"ghost",
|
|
115
|
+
"headerCell",
|
|
116
|
+
"id",
|
|
117
|
+
"indentSize",
|
|
118
|
+
"loading",
|
|
119
|
+
"locale",
|
|
120
|
+
"manualRequest",
|
|
121
|
+
"measureRowRender",
|
|
122
|
+
"name",
|
|
123
|
+
"onDataSourceChange",
|
|
124
|
+
"onExpand",
|
|
125
|
+
"onExpandedRowsChange",
|
|
126
|
+
"onHeaderRow",
|
|
127
|
+
"onLoad",
|
|
128
|
+
"onLoadingChange",
|
|
129
|
+
"onRequestError",
|
|
130
|
+
"onReset",
|
|
131
|
+
"onRow",
|
|
132
|
+
"onSubmit",
|
|
133
|
+
"pagination",
|
|
134
|
+
"params",
|
|
135
|
+
"polling",
|
|
136
|
+
"postData",
|
|
137
|
+
"prefixCls",
|
|
138
|
+
"request",
|
|
139
|
+
"revalidateOnFocus",
|
|
140
|
+
"rootClass",
|
|
141
|
+
"rowClassName",
|
|
142
|
+
"rowHoverable",
|
|
143
|
+
"rowKey",
|
|
144
|
+
"rowSelection",
|
|
145
|
+
"scroll",
|
|
146
|
+
"searchFormRender",
|
|
147
|
+
"showHeader",
|
|
148
|
+
"showSorterTooltip",
|
|
149
|
+
"size",
|
|
150
|
+
"sortDirections",
|
|
151
|
+
"sticky",
|
|
152
|
+
"styles",
|
|
153
|
+
"summary",
|
|
154
|
+
"tableClass",
|
|
155
|
+
"tableExtraRender",
|
|
156
|
+
"tableLayout",
|
|
157
|
+
"tableRender",
|
|
158
|
+
"tableViewRender",
|
|
159
|
+
"tailor",
|
|
160
|
+
"title",
|
|
161
|
+
"type",
|
|
162
|
+
"virtual"
|
|
163
|
+
]
|
|
164
|
+
});
|
|
165
|
+
//#endregion
|
|
166
|
+
export { DragSortProTable as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { ProAliasCssVarToken } from "@antdv-vue/pro-provider";
|
|
3
|
+
|
|
4
|
+
//#region src/components/DragSortTable/style/index.d.ts
|
|
5
|
+
interface ProDragSortTableToken extends ProAliasCssVarToken {}
|
|
6
|
+
declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ProDragSortTableToken, _default as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useStyle } from "@antdv-vue/pro-provider";
|
|
2
|
+
import { mergeToken } from "@antdv-next/cssinjs";
|
|
3
|
+
//#region src/components/DragSortTable/style/index.ts
|
|
4
|
+
const genProDragSortTableStyle = (token) => {
|
|
5
|
+
return { [token.componentCls]: {
|
|
6
|
+
"&-icon": {
|
|
7
|
+
marginInlineEnd: 8,
|
|
8
|
+
color: token.colorTextSecondary,
|
|
9
|
+
cursor: "grab !important",
|
|
10
|
+
padding: 4,
|
|
11
|
+
fontSize: 12,
|
|
12
|
+
borderRadius: token.borderRadius,
|
|
13
|
+
"&:hover": {
|
|
14
|
+
color: token.colorText,
|
|
15
|
+
backgroundColor: token.colorInfoBg
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
[`${token.antCls}-table-wrapper`]: { [`${token.antCls}-table`]: { "&-tbody": { [`${token.antCls}-table-row`]: { [`${token.antCls}-table-cell`]: {} } } } }
|
|
19
|
+
} };
|
|
20
|
+
};
|
|
21
|
+
var style_default = useStyle("ProDragSortTable", (token) => {
|
|
22
|
+
return [genProDragSortTableStyle(mergeToken(token, {}))];
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { style_default as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { VueNode } from "@v-c/util";
|
|
3
|
+
import { DropdownProps, MenuItemProps } from "antdv-next";
|
|
4
|
+
|
|
5
|
+
//#region src/components/Dropdown/Button.d.ts
|
|
6
|
+
type MenuItems = MenuItemProps & {
|
|
7
|
+
name: VueNode;
|
|
8
|
+
key: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
};
|
|
11
|
+
type TableDropdownButtonProps = DropdownProps & {
|
|
12
|
+
menus?: MenuItems[];
|
|
13
|
+
onSelect?: (key: string) => void;
|
|
14
|
+
};
|
|
15
|
+
declare const TableDropdownButton: _$vue.DefineSetupFnComponent<TableDropdownButtonProps, {}, {}, DropdownProps & {
|
|
16
|
+
menus?: MenuItems[];
|
|
17
|
+
onSelect?: (key: string) => void;
|
|
18
|
+
} & {}, _$vue.PublicProps>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { TableDropdownButtonProps, TableDropdownButton as default };
|