zmdms-webui 0.0.78 → 0.0.80
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/es/table/table.js +8 -8
- package/package.json +1 -1
package/dist/es/table/table.js
CHANGED
|
@@ -32,7 +32,7 @@ import { DndProvider } from '../node_modules/react-dnd/dist/core/DndProvider.js'
|
|
|
32
32
|
// TODO: 实现表头自定义伸缩
|
|
33
33
|
var Table = function (props) {
|
|
34
34
|
// console.log("表格渲染");
|
|
35
|
-
var className = props.className, _a = props.bordered, bordered = _a === void 0 ? true : _a, _b = props.pagination, pagination = _b === void 0 ? false : _b, isFlex = props.isFlex; props.tablePreferences; var dynamicKey = props.dynamicKey, hiddenDynamicIcon = props.hiddenDynamicIcon, columns = props.columns, dataSource = props.dataSource, onTableChange = props.onTableChange, isEdit = props.isEdit, isMove = props.isMove, isAdd = props.isAdd, addMode = props.addMode, addCallback = props.addCallback, isDel = props.isDel, _c = props.isDelAll, isDelAll = _c === void 0 ? true : _c, isAddAndDelAuto = props.isAddAndDelAuto, summaryConfig = props.summaryConfig, _d = props.summaryFixed, summaryFixed = _d === void 0 ? true : _d, isInnerPagination = props.isInnerPagination, _e = props.innerPaginationPageSize, innerPaginationPageSize = _e === void 0 ? 30 : _e, _f = props.innerPaginationPosition, innerPaginationPosition = _f === void 0 ? INNER_TABLE_PAGINATION_POSITION : _f, _g = props.innerPaginationPageSizeOptions, innerPaginationPageSizeOptions = _g === void 0 ? INNER_TABLE_PAGINATION_PAGESIZEOPTIONS : _g, tableRefHandle = props.tableRefHandle, tableName = props.tableName, serviceOrder = props.serviceOrder, differences = props.differences, virtualKey = props.virtualKey,
|
|
35
|
+
var className = props.className, _a = props.bordered, bordered = _a === void 0 ? true : _a, _b = props.pagination, pagination = _b === void 0 ? false : _b, isFlex = props.isFlex; props.tablePreferences; var dynamicKey = props.dynamicKey, hiddenDynamicIcon = props.hiddenDynamicIcon, columns = props.columns, dataSource = props.dataSource, onTableChange = props.onTableChange, isEdit = props.isEdit, isMove = props.isMove, isAdd = props.isAdd, addMode = props.addMode, addCallback = props.addCallback, isDel = props.isDel, _c = props.isDelAll, isDelAll = _c === void 0 ? true : _c, isAddAndDelAuto = props.isAddAndDelAuto, summaryConfig = props.summaryConfig, _d = props.summaryFixed, summaryFixed = _d === void 0 ? true : _d, isInnerPagination = props.isInnerPagination, _e = props.innerPaginationPageSize, innerPaginationPageSize = _e === void 0 ? 30 : _e, _f = props.innerPaginationPosition, innerPaginationPosition = _f === void 0 ? INNER_TABLE_PAGINATION_POSITION : _f, _g = props.innerPaginationPageSizeOptions, innerPaginationPageSizeOptions = _g === void 0 ? INNER_TABLE_PAGINATION_PAGESIZEOPTIONS : _g, tableRefHandle = props.tableRefHandle, tableName = props.tableName, serviceOrder = props.serviceOrder, differences = props.differences, virtualKey = props.virtualKey, isResizableColumn = props.isResizableColumn, resetProps = __rest(props, ["className", "bordered", "pagination", "isFlex", "tablePreferences", "dynamicKey", "hiddenDynamicIcon", "columns", "dataSource", "onTableChange", "isEdit", "isMove", "isAdd", "addMode", "addCallback", "isDel", "isDelAll", "isAddAndDelAuto", "summaryConfig", "summaryFixed", "isInnerPagination", "innerPaginationPageSize", "innerPaginationPosition", "innerPaginationPageSizeOptions", "tableRefHandle", "tableName", "serviceOrder", "differences", "virtualKey", "isResizableColumn"]);
|
|
36
36
|
var classes = classNames("ztxk-table", className, {
|
|
37
37
|
"ztxk-table--flex": isFlex,
|
|
38
38
|
});
|
|
@@ -42,14 +42,14 @@ var Table = function (props) {
|
|
|
42
42
|
dataSourceRef.current = dataSource;
|
|
43
43
|
}, [dataSource]);
|
|
44
44
|
// 得到动态列配置信息
|
|
45
|
-
var
|
|
45
|
+
var _h = useDynamicListByColumns(columns, dynamicKey), defaultDynamicList = _h.defaultDynamicList, onCurrentListChange = _h.onCurrentListChange, currentDynamicList = _h.currentDynamicList, dynamicSettingRef = _h.dynamicSettingRef;
|
|
46
46
|
// 针对SCU和增减行 做特殊处理
|
|
47
|
-
var
|
|
47
|
+
var _j = useScuRfresh(), refreshScuCell = _j.refreshScuCell, getRefreshScuCell = _j.getRefreshScuCell;
|
|
48
48
|
// 内部分页相关配置
|
|
49
|
-
var
|
|
49
|
+
var _k = useInnerPagination(isInnerPagination, innerPaginationPageSize, {
|
|
50
50
|
innerPaginationPosition: innerPaginationPosition,
|
|
51
51
|
innerPaginationPageSizeOptions: innerPaginationPageSizeOptions,
|
|
52
|
-
}), paginationConfig =
|
|
52
|
+
}), paginationConfig = _k.paginationConfig, currentPage = _k.currentPage, setCurrent = _k.setCurrent, pageSize = _k.pageSize;
|
|
53
53
|
// 内部表格编辑事件
|
|
54
54
|
var onEditableSave = useEditChange(dataSourceRef, onTableChange);
|
|
55
55
|
// 内部表格拖拽事件
|
|
@@ -68,12 +68,12 @@ var Table = function (props) {
|
|
|
68
68
|
currentPage: currentPage,
|
|
69
69
|
});
|
|
70
70
|
// 自定义排序方法
|
|
71
|
-
var
|
|
71
|
+
var _l = useCustomSort(dataSource, onTableChange, {
|
|
72
72
|
refreshScuCell: refreshScuCell,
|
|
73
73
|
currentPage: currentPage,
|
|
74
74
|
rowKey: props === null || props === void 0 ? void 0 : props.rowKey,
|
|
75
75
|
serviceOrder: serviceOrder,
|
|
76
|
-
}), order =
|
|
76
|
+
}), order = _l.order, setOrder = _l.setOrder, customSortHandle = _l.customSortHandle;
|
|
77
77
|
// 处理列配置信息 得到新的列配置信息
|
|
78
78
|
var newColumns = useColumns(columns, {
|
|
79
79
|
// 动态列配置相关信息
|
|
@@ -109,7 +109,7 @@ var Table = function (props) {
|
|
|
109
109
|
isDel: isDel,
|
|
110
110
|
});
|
|
111
111
|
// 表格验证
|
|
112
|
-
var
|
|
112
|
+
var _m = useTableValidate(), tableRef = _m.tableRef, getCurrentTable = _m.getCurrentTable, clearErrorClass = _m.clearErrorClass;
|
|
113
113
|
// 虚拟滚动选项
|
|
114
114
|
var vComponents = useMemo(function () {
|
|
115
115
|
var _a;
|