@teamias/rex-design 0.0.1
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/LICENSE +21 -0
- package/README.md +43 -0
- package/dist/components/action-buttons/action-buttons.d.ts +2 -0
- package/dist/components/action-buttons/action-buttons.js +182 -0
- package/dist/components/action-buttons/demo/index.d.ts +2 -0
- package/dist/components/action-buttons/demo/index.js +69 -0
- package/dist/components/action-buttons/index.d.ts +3 -0
- package/dist/components/action-buttons/index.js +3 -0
- package/dist/components/action-buttons/modules/handlerFilter.d.ts +2 -0
- package/dist/components/action-buttons/modules/handlerFilter.js +62 -0
- package/dist/components/action-buttons/types.d.ts +96 -0
- package/dist/components/action-buttons/types.js +3 -0
- package/dist/components/base-form/base-form.d.ts +3 -0
- package/dist/components/base-form/base-form.js +260 -0
- package/dist/components/base-form/demo/index.d.ts +4 -0
- package/dist/components/base-form/demo/index.js +515 -0
- package/dist/components/base-form/index.d.ts +4 -0
- package/dist/components/base-form/index.js +4 -0
- package/dist/components/base-form/locales/en-US.json +21 -0
- package/dist/components/base-form/locales/zh-CN.json +21 -0
- package/dist/components/base-form/locales.index.d.ts +42 -0
- package/dist/components/base-form/locales.index.js +4 -0
- package/dist/components/base-form/modules/dependencyUtils.d.ts +13 -0
- package/dist/components/base-form/modules/dependencyUtils.js +43 -0
- package/dist/components/base-form/modules/handlerData.d.ts +8 -0
- package/dist/components/base-form/modules/handlerData.js +59 -0
- package/dist/components/base-form/modules/renderComponentNode.d.ts +11 -0
- package/dist/components/base-form/modules/renderComponentNode.js +607 -0
- package/dist/components/base-form/modules/valuesToFields.d.ts +10 -0
- package/dist/components/base-form/modules/valuesToFields.js +18 -0
- package/dist/components/base-form/style/index.d.ts +3 -0
- package/dist/components/base-form/style/index.js +8 -0
- package/dist/components/base-form/types.d.ts +181 -0
- package/dist/components/base-form/types.js +10 -0
- package/dist/components/base-list-table/base-list-table.d.ts +33 -0
- package/dist/components/base-list-table/base-list-table.js +292 -0
- package/dist/components/base-list-table/demo/BasicBaseListTable.d.ts +2 -0
- package/dist/components/base-list-table/demo/BasicBaseListTable.js +1469 -0
- package/dist/components/base-list-table/demo/NoData.d.ts +2 -0
- package/dist/components/base-list-table/demo/NoData.js +55 -0
- package/dist/components/base-list-table/demo/TableMaxRowCount.d.ts +2 -0
- package/dist/components/base-list-table/demo/TableMaxRowCount.js +1696 -0
- package/dist/components/base-list-table/demo/VirtualDemo.d.ts +2 -0
- package/dist/components/base-list-table/demo/VirtualDemo.js +548 -0
- package/dist/components/base-list-table/index.d.ts +1 -0
- package/dist/components/base-list-table/index.js +1 -0
- package/dist/components/base-list-table/style/index.d.ts +5 -0
- package/dist/components/base-list-table/style/index.js +17 -0
- package/dist/components/base-table/base-table.d.ts +51 -0
- package/dist/components/base-table/base-table.js +291 -0
- package/dist/components/base-table/components/BaseTableRow.d.ts +1 -0
- package/dist/components/base-table/components/BaseTableRow.js +129 -0
- package/dist/components/base-table/demo/BaseTableAll.d.ts +2 -0
- package/dist/components/base-table/demo/BaseTableAll.js +66 -0
- package/dist/components/base-table/demo/BaseTableBasic.d.ts +2 -0
- package/dist/components/base-table/demo/BaseTableBasic.js +58 -0
- package/dist/components/base-table/demo/BaseTableIndex.d.ts +2 -0
- package/dist/components/base-table/demo/BaseTableIndex.js +57 -0
- package/dist/components/base-table/demo/BaseTableRowSelect.d.ts +2 -0
- package/dist/components/base-table/demo/BaseTableRowSelect.js +45 -0
- package/dist/components/base-table/demo/tableData.d.ts +332 -0
- package/dist/components/base-table/demo/tableData.js +293 -0
- package/dist/components/base-table/index.d.ts +1 -0
- package/dist/components/base-table/index.js +1 -0
- package/dist/components/base-table/style/index.d.ts +3 -0
- package/dist/components/base-table/style/index.js +9 -0
- package/dist/components/data-cell/data-cell.d.ts +3 -0
- package/dist/components/data-cell/data-cell.js +17 -0
- package/dist/components/data-cell/demo/index.d.ts +2 -0
- package/dist/components/data-cell/demo/index.js +332 -0
- package/dist/components/data-cell/index.d.ts +2 -0
- package/dist/components/data-cell/index.js +2 -0
- package/dist/components/data-cell/modules/cellItemMap.d.ts +3 -0
- package/dist/components/data-cell/modules/cellItemMap.js +374 -0
- package/dist/components/data-cell/style/index.d.ts +7 -0
- package/dist/components/data-cell/style/index.js +23 -0
- package/dist/components/data-cell/types.d.ts +192 -0
- package/dist/components/data-cell/types.js +1 -0
- package/dist/components/icons/assets/icon-park--arrow-up.svg +7 -0
- package/dist/components/icons/assets/index.d.ts +4 -0
- package/dist/components/icons/assets/index.js +9 -0
- package/dist/components/icons/assets/svg-spinners--blocks-shuffle-3.svg +21 -0
- package/dist/components/icons/demo/index.d.ts +2 -0
- package/dist/components/icons/demo/index.js +43 -0
- package/dist/components/icons/icons.d.ts +39 -0
- package/dist/components/icons/icons.js +251 -0
- package/dist/components/icons/index.d.ts +1 -0
- package/dist/components/icons/index.js +1 -0
- package/dist/components/icons/style/index.d.ts +2 -0
- package/dist/components/icons/style/index.js +5 -0
- package/dist/components/media-viewer/demo/index.d.ts +2 -0
- package/dist/components/media-viewer/demo/index.js +23 -0
- package/dist/components/media-viewer/index.d.ts +1 -0
- package/dist/components/media-viewer/index.js +1 -0
- package/dist/components/media-viewer/media-viewer.d.ts +48 -0
- package/dist/components/media-viewer/media-viewer.js +119 -0
- package/dist/components/media-viewer/style/index.d.ts +6 -0
- package/dist/components/media-viewer/style/index.js +31 -0
- package/dist/hooks/request-fields-container/demo/index.d.ts +2 -0
- package/dist/hooks/request-fields-container/demo/index.js +36 -0
- package/dist/hooks/request-fields-container/index.d.ts +4 -0
- package/dist/hooks/request-fields-container/index.js +3 -0
- package/dist/hooks/request-fields-container/request-fields-container-context-provider.d.ts +22 -0
- package/dist/hooks/request-fields-container/request-fields-container-context-provider.js +134 -0
- package/dist/hooks/request-fields-container/request-fields-container-context.d.ts +39 -0
- package/dist/hooks/request-fields-container/request-fields-container-context.js +5 -0
- package/dist/hooks/request-fields-container/request-fields-container-hoc.d.ts +4 -0
- package/dist/hooks/request-fields-container/request-fields-container-hoc.js +31 -0
- package/dist/hooks/request-fields-container/use-request-fields-container.d.ts +22 -0
- package/dist/hooks/request-fields-container/use-request-fields-container.js +131 -0
- package/dist/hooks/rex-pro-config-provider/demo/index.d.ts +2 -0
- package/dist/hooks/rex-pro-config-provider/demo/index.js +61 -0
- package/dist/hooks/rex-pro-config-provider/index.d.ts +2 -0
- package/dist/hooks/rex-pro-config-provider/index.js +2 -0
- package/dist/hooks/rex-pro-config-provider/rex-pro-config-context.d.ts +27 -0
- package/dist/hooks/rex-pro-config-provider/rex-pro-config-context.js +33 -0
- package/dist/hooks/rex-pro-config-provider/rex-pro-config-provider.d.ts +6 -0
- package/dist/hooks/rex-pro-config-provider/rex-pro-config-provider.js +24 -0
- package/dist/hooks/rex-pro-config-provider/use-rex-pro-config-provider.d.ts +2 -0
- package/dist/hooks/rex-pro-config-provider/use-rex-pro-config-provider.js +11 -0
- package/dist/hooks/use-state-data/demo/index.d.ts +2 -0
- package/dist/hooks/use-state-data/demo/index.js +135 -0
- package/dist/hooks/use-state-data/index.d.ts +1 -0
- package/dist/hooks/use-state-data/index.js +1 -0
- package/dist/hooks/use-state-data/use-state-data.d.ts +11 -0
- package/dist/hooks/use-state-data/use-state-data.js +64 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/types/svg.d.ts +4 -0
- package/dist/utils/locales/en-US.json +13 -0
- package/dist/utils/locales/index.d.ts +26 -0
- package/dist/utils/locales/index.js +4 -0
- package/dist/utils/locales/zh-CN.json +13 -0
- package/package.json +90 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
var _excluded = ["useDataCellRender", "fields", "fieldsConfig", "fieldProps", "requestFields", "requestFieldsUrl", "requestFieldsParams", "fieldPropsFn", "indexColumn", "extraColumns", "onDataCellClick", "onDataCellClickV2", "scroll", "rootClassName", "customEmptyText"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
import React, { useMemo } from 'react';
|
|
12
|
+
import { useDebounceEffect } from 'ahooks';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import { ConfigProvider, Empty, Skeleton, Table } from "antd";
|
|
15
|
+
import { useStateData, useRequestFields, useRequestFieldsConfig, useRexProConfigProvider } from "../..";
|
|
16
|
+
import { BaseTableRow } from "./components/BaseTableRow";
|
|
17
|
+
import { DataCell } from "../data-cell/data-cell";
|
|
18
|
+
export var BaseTable = function BaseTable(_ref) {
|
|
19
|
+
var _ref$useDataCellRende = _ref.useDataCellRender,
|
|
20
|
+
useDataCellRender = _ref$useDataCellRende === void 0 ? true : _ref$useDataCellRende,
|
|
21
|
+
outFields = _ref.fields,
|
|
22
|
+
fieldsConfig = _ref.fieldsConfig,
|
|
23
|
+
outFieldProps = _ref.fieldProps,
|
|
24
|
+
requestFields = _ref.requestFields,
|
|
25
|
+
requestFieldsUrl = _ref.requestFieldsUrl,
|
|
26
|
+
requestFieldsParams = _ref.requestFieldsParams,
|
|
27
|
+
fieldPropsFn = _ref.fieldPropsFn,
|
|
28
|
+
indexColumn = _ref.indexColumn,
|
|
29
|
+
extraColumns = _ref.extraColumns,
|
|
30
|
+
onDataCellClick = _ref.onDataCellClick,
|
|
31
|
+
onDataCellClickV2 = _ref.onDataCellClickV2,
|
|
32
|
+
scroll = _ref.scroll,
|
|
33
|
+
rootClassName = _ref.rootClassName,
|
|
34
|
+
customEmptyText = _ref.customEmptyText,
|
|
35
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
+
var responseConfig = useRequestFieldsConfig();
|
|
37
|
+
var _useRexProConfigProvi = useRexProConfigProvider(),
|
|
38
|
+
operationPermission = _useRexProConfigProvi.operationPermission,
|
|
39
|
+
formatMessage = _useRexProConfigProvi.intl.formatMessage;
|
|
40
|
+
var _useStateData = useStateData(function () {
|
|
41
|
+
return {
|
|
42
|
+
onDataCellClick: onDataCellClick,
|
|
43
|
+
onDataCellClickV2: onDataCellClickV2,
|
|
44
|
+
useDataCellRender: useDataCellRender,
|
|
45
|
+
scrollHeight: 300,
|
|
46
|
+
tableWidth: window.innerWidth,
|
|
47
|
+
tableKey: "table-".concat(Date.now(), "-").concat(parseInt("".concat(Math.random() * 10000), 10))
|
|
48
|
+
};
|
|
49
|
+
}),
|
|
50
|
+
state = _useStateData.state,
|
|
51
|
+
update = _useStateData.update;
|
|
52
|
+
var _useRequestFields = useRequestFields({
|
|
53
|
+
request: requestFields,
|
|
54
|
+
requestFieldsUrl: requestFieldsUrl || responseConfig.tableHeaderUrl,
|
|
55
|
+
requestFieldsParams: requestFieldsParams || responseConfig.tableHeaderParams,
|
|
56
|
+
fieldsConfig: fieldsConfig || outFields || responseConfig.tableHeaderConfig
|
|
57
|
+
}),
|
|
58
|
+
loading = _useRequestFields.loading,
|
|
59
|
+
fields = _useRequestFields.fields;
|
|
60
|
+
|
|
61
|
+
/** 表格点击事件 */
|
|
62
|
+
var cellClick = function cellClick(data) {
|
|
63
|
+
var dataIndex = data.dataIndex,
|
|
64
|
+
record = data.record,
|
|
65
|
+
index = data.index,
|
|
66
|
+
cellItem = data.cellItem,
|
|
67
|
+
subItem = data.subItem;
|
|
68
|
+
if (state.onDataCellClickV2) {
|
|
69
|
+
state.onDataCellClickV2({
|
|
70
|
+
item: cellItem,
|
|
71
|
+
subItem: subItem,
|
|
72
|
+
dataIndex: dataIndex,
|
|
73
|
+
record: record,
|
|
74
|
+
index: index
|
|
75
|
+
});
|
|
76
|
+
} else {
|
|
77
|
+
var _state$onDataCellClic;
|
|
78
|
+
(_state$onDataCellClic = state.onDataCellClick) === null || _state$onDataCellClic === void 0 || _state$onDataCellClic.call(state, cellItem, dataIndex, record, index);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** 生成类名带宽度 */
|
|
83
|
+
var generateClassNameWithWidth = function generateClassNameWithWidth(item) {
|
|
84
|
+
var _item$width;
|
|
85
|
+
return {
|
|
86
|
+
className: classNames(item.className || '', "custom-width::".concat((_item$width = item.width) !== null && _item$width !== void 0 ? _item$width : 100))
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// 列处理
|
|
91
|
+
var _useMemo = useMemo(function () {
|
|
92
|
+
var _fieldPropsFn;
|
|
93
|
+
var fieldProps = (_fieldPropsFn = fieldPropsFn === null || fieldPropsFn === void 0 ? void 0 : fieldPropsFn()) !== null && _fieldPropsFn !== void 0 ? _fieldPropsFn : outFieldProps;
|
|
94
|
+
var inlineColumnCount = 0;
|
|
95
|
+
var each = function each(data) {
|
|
96
|
+
if (!data) return;
|
|
97
|
+
return data.map(function (item) {
|
|
98
|
+
if ('dataIndex' in item && item.dataIndex) {
|
|
99
|
+
var _item$width2;
|
|
100
|
+
var itemProps = item.dataIndex ? fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps[item.dataIndex] : {};
|
|
101
|
+
// defaultWidth.current = item.width ?? defaultWidth.current;
|
|
102
|
+
var mergeItem = _objectSpread(_objectSpread({}, item), itemProps);
|
|
103
|
+
|
|
104
|
+
// 隐藏时候不显示
|
|
105
|
+
if (mergeItem.hidden) return;
|
|
106
|
+
if (operationPermission && !operationPermission(mergeItem.permissionKey)) return;
|
|
107
|
+
|
|
108
|
+
// 渲染列 +1
|
|
109
|
+
inlineColumnCount += 1;
|
|
110
|
+
var newItem = _objectSpread(_objectSpread(_objectSpread({}, item), {}, {
|
|
111
|
+
width: (_item$width2 = item.width) !== null && _item$width2 !== void 0 ? _item$width2 : 100,
|
|
112
|
+
render: function render(value, record, index) {
|
|
113
|
+
if (item.render) return item.render(value, record, index);
|
|
114
|
+
if (!state.useDataCellRender) return _typeof(value) === 'object' && value !== null ? JSON.stringify(value) : value;
|
|
115
|
+
try {
|
|
116
|
+
return Array.isArray(value) ? /*#__PURE__*/React.createElement(DataCell, {
|
|
117
|
+
items: value,
|
|
118
|
+
onClick: function onClick(cellItem, subItem) {
|
|
119
|
+
cellClick({
|
|
120
|
+
dataIndex: item.dataIndex,
|
|
121
|
+
record: record,
|
|
122
|
+
index: index,
|
|
123
|
+
cellItem: cellItem,
|
|
124
|
+
subItem: subItem
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}) : JSON.stringify(value);
|
|
128
|
+
} catch (error) {
|
|
129
|
+
console.error("DataCell render error key:".concat(item.dataIndex, "-value:").concat(value, "-index:").concat(index, "-error:").concat(error));
|
|
130
|
+
return JSON.stringify(value);
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
onCell: function onCell(rawRecord) {
|
|
134
|
+
var record = rawRecord;
|
|
135
|
+
var key = item.dataIndex;
|
|
136
|
+
if (key in record && record[key]) {
|
|
137
|
+
var _record$key, _recordData$rowSpan, _recordData$colSpan;
|
|
138
|
+
var recordData = ((_record$key = record[key]) === null || _record$key === void 0 || (_record$key = _record$key[0]) === null || _record$key === void 0 ? void 0 : _record$key.extra) || {};
|
|
139
|
+
return {
|
|
140
|
+
rowSpan: recordData.rowSpan === -1 ? 0 : (_recordData$rowSpan = recordData.rowSpan) !== null && _recordData$rowSpan !== void 0 ? _recordData$rowSpan : 1,
|
|
141
|
+
colSpan: recordData.colSpan === -1 ? 0 : (_recordData$colSpan = recordData.colSpan) !== null && _recordData$colSpan !== void 0 ? _recordData$colSpan : 1
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
return {};
|
|
145
|
+
}
|
|
146
|
+
}, itemProps), generateClassNameWithWidth(_objectSpread(_objectSpread({}, item), itemProps)));
|
|
147
|
+
delete newItem.hidden;
|
|
148
|
+
delete newItem.permissionKey;
|
|
149
|
+
return newItem;
|
|
150
|
+
}
|
|
151
|
+
if ('children' in item) {
|
|
152
|
+
var children = 'children' in item ? each(item.children) : undefined;
|
|
153
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
154
|
+
children: children
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
return _objectSpread({}, item);
|
|
158
|
+
}).filter(function (ii) {
|
|
159
|
+
return Boolean(ii);
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
// console.log(each(fields), inlineColumnCount);
|
|
164
|
+
return {
|
|
165
|
+
inlineColumns: each(fields),
|
|
166
|
+
columnCount: inlineColumnCount
|
|
167
|
+
};
|
|
168
|
+
}, [fields]),
|
|
169
|
+
inlineColumns = _useMemo.inlineColumns,
|
|
170
|
+
columnCount = _useMemo.columnCount;
|
|
171
|
+
var beforeInlineColumn = [indexColumn && _objectSpread(_objectSpread({
|
|
172
|
+
title: formatMessage({
|
|
173
|
+
id: 'bit.data-display.base-table.column-serial-number-title',
|
|
174
|
+
defaultMessage: '序号'
|
|
175
|
+
}),
|
|
176
|
+
dataIndex: 'key-web-index',
|
|
177
|
+
align: 'center',
|
|
178
|
+
fixed: true,
|
|
179
|
+
width: 50,
|
|
180
|
+
render: function render(_, _1, index) {
|
|
181
|
+
return index + 1;
|
|
182
|
+
}
|
|
183
|
+
}, indexColumn), generateClassNameWithWidth(indexColumn))].filter(function (column) {
|
|
184
|
+
return Boolean(column);
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
// 更新外部引用
|
|
188
|
+
useDebounceEffect(function () {
|
|
189
|
+
state.onDataCellClick = onDataCellClick;
|
|
190
|
+
state.onDataCellClickV2 = onDataCellClickV2;
|
|
191
|
+
state.useDataCellRender = useDataCellRender;
|
|
192
|
+
}, [onDataCellClick, onDataCellClickV2, useDataCellRender]);
|
|
193
|
+
useDebounceEffect(function () {
|
|
194
|
+
if (loading) return;
|
|
195
|
+
var timer = null;
|
|
196
|
+
var fn = function fn() {
|
|
197
|
+
var contentBodyEl = document.querySelector(".".concat(state.tableKey));
|
|
198
|
+
var bodyEl = contentBodyEl === null || contentBodyEl === void 0 ? void 0 : contentBodyEl.querySelector('tbody');
|
|
199
|
+
// console.log(bodyEl);
|
|
200
|
+
|
|
201
|
+
if (!bodyEl) return;
|
|
202
|
+
if (timer) clearTimeout(timer);
|
|
203
|
+
timer = setTimeout(function () {
|
|
204
|
+
timer = null;
|
|
205
|
+
var bodyRect = bodyEl.getBoundingClientRect();
|
|
206
|
+
// 54: 底部padding + 分页高度 + 分页padding
|
|
207
|
+
state.scrollHeight = Math.max(window.innerHeight - bodyRect.top - 54, 300);
|
|
208
|
+
state.tableWidth = contentBodyEl.offsetWidth;
|
|
209
|
+
// console.log(state.scrollHeight);
|
|
210
|
+
update();
|
|
211
|
+
}, 0);
|
|
212
|
+
};
|
|
213
|
+
fn();
|
|
214
|
+
window.addEventListener('resize', fn);
|
|
215
|
+
return function () {
|
|
216
|
+
window.removeEventListener('resize', fn);
|
|
217
|
+
};
|
|
218
|
+
}, [loading], {
|
|
219
|
+
wait: 0
|
|
220
|
+
});
|
|
221
|
+
if (loading) {
|
|
222
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Skeleton, {
|
|
223
|
+
active: true
|
|
224
|
+
}), /*#__PURE__*/React.createElement(Skeleton, {
|
|
225
|
+
active: true
|
|
226
|
+
}));
|
|
227
|
+
}
|
|
228
|
+
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
229
|
+
renderEmpty: function renderEmpty(componentName) {
|
|
230
|
+
if (componentName === 'Table') {
|
|
231
|
+
return /*#__PURE__*/React.createElement(Empty, {
|
|
232
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
233
|
+
description: customEmptyText
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}, /*#__PURE__*/React.createElement(Table, _extends({
|
|
238
|
+
columns: [].concat(beforeInlineColumn || [], inlineColumns || [], (extraColumns || []).map(function (ii) {
|
|
239
|
+
return _objectSpread(_objectSpread({}, ii), generateClassNameWithWidth(ii));
|
|
240
|
+
})),
|
|
241
|
+
rowKey: "key"
|
|
242
|
+
}, otherProps, {
|
|
243
|
+
rootClassName: classNames(state.tableKey, rootClassName),
|
|
244
|
+
onRow: function onRow() {
|
|
245
|
+
return {
|
|
246
|
+
'data-column-count': columnCount,
|
|
247
|
+
'data-cell-click-event': cellClick,
|
|
248
|
+
'data-table-width': state.tableWidth
|
|
249
|
+
};
|
|
250
|
+
},
|
|
251
|
+
components: {
|
|
252
|
+
body: {
|
|
253
|
+
row: BaseTableRow
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
rowSelection: otherProps.rowSelection ? _objectSpread({
|
|
257
|
+
columnWidth: 50,
|
|
258
|
+
fixed: 'left',
|
|
259
|
+
// className: `custom-width::${otherProps.rowSelection.columnWidth ?? 50}`,
|
|
260
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
261
|
+
if (record.is_checkbox === 2) {
|
|
262
|
+
return {
|
|
263
|
+
style: {
|
|
264
|
+
display: 'none'
|
|
265
|
+
},
|
|
266
|
+
disabled: true
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
return {};
|
|
270
|
+
}
|
|
271
|
+
}, otherProps.rowSelection) : undefined,
|
|
272
|
+
size: "small",
|
|
273
|
+
bordered: true,
|
|
274
|
+
tableLayout: "fixed",
|
|
275
|
+
scroll: typeof scroll === 'function' ? scroll(state.scrollHeight) : scroll
|
|
276
|
+
})));
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
/** 组件props */
|
|
280
|
+
|
|
281
|
+
// export interface IBaseTableFieldItem<T> {
|
|
282
|
+
// /** 唯一值 */
|
|
283
|
+
// dataIndex?: string;
|
|
284
|
+
// children?: Array<IBaseTableFieldItem<T> & TBaseTableColumns<T>>
|
|
285
|
+
// /** 标题 */
|
|
286
|
+
// // title?: string;
|
|
287
|
+
// /** 展示样式 */
|
|
288
|
+
// // valueType?: 'default';
|
|
289
|
+
// /** 列宽 */
|
|
290
|
+
// // width?: string | number;
|
|
291
|
+
// }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BaseTableRow: (outProps: any) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
var _excluded = ["data-cell-click-event", "data-column-count", "data-table-width"];
|
|
2
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
+
/* eslint-disable react/destructuring-assignment */
|
|
5
|
+
import classNames from "classnames";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { TableParentRow, TableParentRowCell } from "../style";
|
|
8
|
+
import { DataCell } from "../../data-cell/data-cell";
|
|
9
|
+
export var BaseTableRow = function BaseTableRow(outProps) {
|
|
10
|
+
var cellClick = outProps['data-cell-click-event'],
|
|
11
|
+
columnCount = outProps['data-column-count'],
|
|
12
|
+
tableWidth = outProps['data-table-width'],
|
|
13
|
+
props = _objectWithoutProperties(outProps, _excluded);
|
|
14
|
+
var rowKey = props['data-row-key'];
|
|
15
|
+
var getWidth = function getWidth(config) {
|
|
16
|
+
var _config$props;
|
|
17
|
+
if (!config) return 50;
|
|
18
|
+
var val = (_config$props = config.props) === null || _config$props === void 0 || (_config$props = _config$props.className) === null || _config$props === void 0 || (_config$props = _config$props.match(/custom-width::([\d\w%]+)/)) === null || _config$props === void 0 ? void 0 : _config$props[1];
|
|
19
|
+
return parseFloat("".concat(val || 50));
|
|
20
|
+
};
|
|
21
|
+
try {
|
|
22
|
+
var _rowKey$includes;
|
|
23
|
+
if (rowKey !== null && rowKey !== void 0 && (_rowKey$includes = rowKey.includes) !== null && _rowKey$includes !== void 0 && _rowKey$includes.call(rowKey, 'parent_')) {
|
|
24
|
+
// console.log(props);
|
|
25
|
+
var record = props.children[0].props.record;
|
|
26
|
+
var index = props.children[0].props.index;
|
|
27
|
+
var leftArr = props.children.filter(function (ii) {
|
|
28
|
+
return typeof ii.props.fixLeft === 'number';
|
|
29
|
+
});
|
|
30
|
+
var rightArr = props.children.filter(function (ii) {
|
|
31
|
+
return typeof ii.props.fixRight === 'number';
|
|
32
|
+
});
|
|
33
|
+
/** 是否存在左边固定列 */
|
|
34
|
+
var hanBeforeColumns = leftArr.filter(function (ii) {
|
|
35
|
+
var _ii$props$dataIndex, _ii$props$className;
|
|
36
|
+
return ((_ii$props$dataIndex = ii.props.dataIndex) === null || _ii$props$dataIndex === void 0 ? void 0 : _ii$props$dataIndex.includes('key-')) || ((_ii$props$className = ii.props.className) === null || _ii$props$className === void 0 ? void 0 : _ii$props$className.includes('ant-table-'));
|
|
37
|
+
});
|
|
38
|
+
/** 左边宽度 */
|
|
39
|
+
var leftWidth = hanBeforeColumns.reduce(function (acc, ii) {
|
|
40
|
+
return acc + getWidth(ii);
|
|
41
|
+
}, 0);
|
|
42
|
+
// const hasIndexColumn = leftArr[0] && leftArr[0].key.includes('webIndex');
|
|
43
|
+
var isRight = rightArr[rightArr.length - 1] && rightArr[rightArr.length - 1].key.includes('key-');
|
|
44
|
+
/** 右边宽度 */
|
|
45
|
+
var rightWidth = getWidth(rightArr[rightArr.length - 1]);
|
|
46
|
+
/**
|
|
47
|
+
* 偏移量
|
|
48
|
+
* - td的padding值: 16
|
|
49
|
+
* - 滚动条的宽度 20
|
|
50
|
+
*/
|
|
51
|
+
var offsetWidth = 16 + 20;
|
|
52
|
+
// console.log(props);
|
|
53
|
+
|
|
54
|
+
return /*#__PURE__*/React.createElement(TableParentRow, {
|
|
55
|
+
className: classNames("base-table-parent-row", props.className),
|
|
56
|
+
key: rowKey,
|
|
57
|
+
"data-row-key": rowKey
|
|
58
|
+
}, function () {
|
|
59
|
+
var content = function content(width) {
|
|
60
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
style: {
|
|
62
|
+
width: width
|
|
63
|
+
}
|
|
64
|
+
}, Object.keys(record).map(function (key) {
|
|
65
|
+
return Array.isArray(record[key]) ? /*#__PURE__*/React.createElement(DataCell, {
|
|
66
|
+
key: key,
|
|
67
|
+
items: record[key],
|
|
68
|
+
onClick: function onClick(cellItem, subItem) {
|
|
69
|
+
// cellClick({dataIndex: 'parent'}, record, 0, cellItem, subItem);
|
|
70
|
+
cellClick({
|
|
71
|
+
dataIndex: 'parent',
|
|
72
|
+
record: record,
|
|
73
|
+
index: index,
|
|
74
|
+
cellItem: cellItem,
|
|
75
|
+
subItem: subItem
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}) : /*#__PURE__*/React.createElement("span", {
|
|
79
|
+
style: {
|
|
80
|
+
display: 'none'
|
|
81
|
+
},
|
|
82
|
+
key: key
|
|
83
|
+
});
|
|
84
|
+
}));
|
|
85
|
+
};
|
|
86
|
+
try {
|
|
87
|
+
// console.log(hanBeforeColumns, rightArr);
|
|
88
|
+
// console.log(tableWidth, leftWidth, rightWidth, offsetWidth);
|
|
89
|
+
|
|
90
|
+
var dom1 = hanBeforeColumns.length ? hanBeforeColumns.map(function (ii) {
|
|
91
|
+
return /*#__PURE__*/React.cloneElement(ii);
|
|
92
|
+
}) : null;
|
|
93
|
+
var dom2 = /*#__PURE__*/React.createElement(TableParentRowCell, {
|
|
94
|
+
className: "base-table-parent-row-td"
|
|
95
|
+
// colSpan={Math.max(+columnCount - (isRight ? 1 : 0), 0)}
|
|
96
|
+
,
|
|
97
|
+
style: {
|
|
98
|
+
left: hanBeforeColumns.length ? leftWidth : 0
|
|
99
|
+
}
|
|
100
|
+
}, content(tableWidth - leftWidth - (isRight ? rightWidth : 0) - offsetWidth));
|
|
101
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, dom1, dom2);
|
|
102
|
+
} catch (error) {
|
|
103
|
+
var _props$rowSelection$c, _props$rowSelection;
|
|
104
|
+
console.error('BaseTableRow-TableParentRow error:', error);
|
|
105
|
+
/** 是否存在选择列 */
|
|
106
|
+
var hasSelectedColumn = leftArr[0] && leftArr[0].key.includes('key-');
|
|
107
|
+
var _dom = hasSelectedColumn ? /*#__PURE__*/React.cloneElement(leftArr[0]) : null;
|
|
108
|
+
var _dom2 = /*#__PURE__*/React.createElement(TableParentRowCell, {
|
|
109
|
+
className: "base-table-parent-row-td"
|
|
110
|
+
// colSpan={Math.max(+columnCount - (isRight ? 1 : 0), 0)}
|
|
111
|
+
,
|
|
112
|
+
style: {
|
|
113
|
+
left: hasSelectedColumn ? (_props$rowSelection$c = (_props$rowSelection = props.rowSelection) === null || _props$rowSelection === void 0 ? void 0 : _props$rowSelection.columnWidth) !== null && _props$rowSelection$c !== void 0 ? _props$rowSelection$c : 50 : 0
|
|
114
|
+
}
|
|
115
|
+
}, content(tableWidth - leftWidth - (isRight ? rightWidth : 0) - offsetWidth));
|
|
116
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _dom, _dom2);
|
|
117
|
+
}
|
|
118
|
+
}(), new Array(Math.max(+columnCount - 1, 0)).fill('').map(function (_, i) {
|
|
119
|
+
return /*#__PURE__*/React.createElement("td", {
|
|
120
|
+
key: i,
|
|
121
|
+
"aria-hidden": "true"
|
|
122
|
+
});
|
|
123
|
+
}), isRight ? /*#__PURE__*/React.cloneElement(rightArr[rightArr.length - 1]) : null);
|
|
124
|
+
}
|
|
125
|
+
} catch (e) {
|
|
126
|
+
console.error('BaseTableRow error:', e);
|
|
127
|
+
}
|
|
128
|
+
return /*#__PURE__*/React.createElement("tr", props);
|
|
129
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseTable } from "../base-table";
|
|
3
|
+
import { tableData } from "./tableData";
|
|
4
|
+
export default (function () {
|
|
5
|
+
return /*#__PURE__*/React.createElement(BaseTable, {
|
|
6
|
+
fieldsConfig: [{
|
|
7
|
+
"title": "beforeExtraColumns",
|
|
8
|
+
"dataIndex": "beforeExtraColumns",
|
|
9
|
+
width: 200
|
|
10
|
+
}, {
|
|
11
|
+
"title": "编号/状态",
|
|
12
|
+
"dataIndex": "status_name",
|
|
13
|
+
width: 200,
|
|
14
|
+
"key": "status_name"
|
|
15
|
+
}, {
|
|
16
|
+
"title": "SPU/组合SKU",
|
|
17
|
+
"dataIndex": "goods_spu_info",
|
|
18
|
+
width: 200,
|
|
19
|
+
"key": "goods_spu_info"
|
|
20
|
+
}, {
|
|
21
|
+
"title": "图片",
|
|
22
|
+
"dataIndex": "goods_image",
|
|
23
|
+
"key": "goods_image",
|
|
24
|
+
width: 200,
|
|
25
|
+
"align": 'center'
|
|
26
|
+
}, {
|
|
27
|
+
"title": "SKU/属性",
|
|
28
|
+
"dataIndex": "goods_sku_info",
|
|
29
|
+
width: 200,
|
|
30
|
+
"key": "goods_sku_info"
|
|
31
|
+
}, {
|
|
32
|
+
"title": "计划员",
|
|
33
|
+
"dataIndex": "planuser",
|
|
34
|
+
width: 200,
|
|
35
|
+
"key": "planuser"
|
|
36
|
+
}, {
|
|
37
|
+
"title": "供应商",
|
|
38
|
+
"dataIndex": "factory",
|
|
39
|
+
width: 200,
|
|
40
|
+
"key": "factory"
|
|
41
|
+
}, {
|
|
42
|
+
"title": "ASIN",
|
|
43
|
+
"dataIndex": "asin",
|
|
44
|
+
"key": "asin",
|
|
45
|
+
width: 200
|
|
46
|
+
}],
|
|
47
|
+
extraColumns: [{
|
|
48
|
+
"title": "extraColumns",
|
|
49
|
+
"dataIndex": "extraColumns",
|
|
50
|
+
width: 200,
|
|
51
|
+
fixed: 'right',
|
|
52
|
+
render: function render() {
|
|
53
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, "123");
|
|
54
|
+
}
|
|
55
|
+
}],
|
|
56
|
+
scroll: function scroll(height) {
|
|
57
|
+
return {
|
|
58
|
+
y: height
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
dataSource: tableData.items,
|
|
62
|
+
pagination: false,
|
|
63
|
+
rowSelection: {},
|
|
64
|
+
indexColumn: {}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseTable } from "../base-table";
|
|
3
|
+
import { tableData } from "./tableData";
|
|
4
|
+
export default (function () {
|
|
5
|
+
return /*#__PURE__*/React.createElement(BaseTable, {
|
|
6
|
+
fieldsConfig: [{
|
|
7
|
+
"title": "编号/状态",
|
|
8
|
+
"dataIndex": "status_name",
|
|
9
|
+
"key": "status_name"
|
|
10
|
+
}, {
|
|
11
|
+
"title": "SPU/组合SKU",
|
|
12
|
+
"dataIndex": "goods_spu_info",
|
|
13
|
+
"key": "goods_spu_info",
|
|
14
|
+
hidden: true
|
|
15
|
+
}, {
|
|
16
|
+
"title": "图片",
|
|
17
|
+
"dataIndex": "goods_image",
|
|
18
|
+
"key": "goods_image",
|
|
19
|
+
"align": 'center'
|
|
20
|
+
}, {
|
|
21
|
+
"title": "SKU/属性",
|
|
22
|
+
"dataIndex": "goods_sku_info",
|
|
23
|
+
"key": "goods_sku_info"
|
|
24
|
+
}, {
|
|
25
|
+
"title": "计划员",
|
|
26
|
+
"dataIndex": "planuser",
|
|
27
|
+
"key": "planuser"
|
|
28
|
+
}, {
|
|
29
|
+
"title": "供应商",
|
|
30
|
+
"dataIndex": "factory",
|
|
31
|
+
"key": "factory"
|
|
32
|
+
}, {
|
|
33
|
+
"title": "ASIN22",
|
|
34
|
+
"dataIndex": "asin",
|
|
35
|
+
"key": "asin"
|
|
36
|
+
}],
|
|
37
|
+
extraColumns: [{
|
|
38
|
+
title: '操作',
|
|
39
|
+
dataIndex: 'key-action',
|
|
40
|
+
fixed: 'right',
|
|
41
|
+
width: 100,
|
|
42
|
+
render: function render() {
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", null, "12312");
|
|
44
|
+
}
|
|
45
|
+
}],
|
|
46
|
+
scroll: function scroll(height) {
|
|
47
|
+
return {
|
|
48
|
+
y: height
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
dataSource: tableData.items,
|
|
52
|
+
pagination: false,
|
|
53
|
+
rowSelection: {},
|
|
54
|
+
onDataCellClickV2: function onDataCellClickV2(data) {
|
|
55
|
+
console.log(data);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createIntl } from "react-intl";
|
|
3
|
+
import { crush } from "radash";
|
|
4
|
+
import { RexProConfigProvider } from "../../..";
|
|
5
|
+
import { BaseTable } from "../base-table";
|
|
6
|
+
import { designDataDisplayEnUS } from "../../../utils/locales";
|
|
7
|
+
import { tableData } from "./tableData";
|
|
8
|
+
export default (function () {
|
|
9
|
+
return /*#__PURE__*/React.createElement(RexProConfigProvider, {
|
|
10
|
+
value: {
|
|
11
|
+
intl: createIntl({
|
|
12
|
+
locale: 'en-US',
|
|
13
|
+
messages: crush(designDataDisplayEnUS),
|
|
14
|
+
onError: function onError() {}
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
}, /*#__PURE__*/React.createElement(BaseTable, {
|
|
18
|
+
fieldsConfig: [{
|
|
19
|
+
"title": "编号/状态",
|
|
20
|
+
"dataIndex": "status_name",
|
|
21
|
+
"key": "status_name"
|
|
22
|
+
}, {
|
|
23
|
+
"title": "SPU/组合SKU",
|
|
24
|
+
"dataIndex": "goods_spu_info",
|
|
25
|
+
"key": "goods_spu_info"
|
|
26
|
+
}, {
|
|
27
|
+
"title": "图片",
|
|
28
|
+
"dataIndex": "goods_image",
|
|
29
|
+
"key": "goods_image",
|
|
30
|
+
"align": 'center'
|
|
31
|
+
}, {
|
|
32
|
+
"title": "SKU/属性",
|
|
33
|
+
"dataIndex": "goods_sku_info",
|
|
34
|
+
"key": "goods_sku_info"
|
|
35
|
+
}, {
|
|
36
|
+
"title": "计划员",
|
|
37
|
+
"dataIndex": "planuser",
|
|
38
|
+
"key": "planuser"
|
|
39
|
+
}, {
|
|
40
|
+
"title": "供应商",
|
|
41
|
+
"dataIndex": "factory",
|
|
42
|
+
"key": "factory"
|
|
43
|
+
}, {
|
|
44
|
+
"title": "ASIN",
|
|
45
|
+
"dataIndex": "asin",
|
|
46
|
+
"key": "asin"
|
|
47
|
+
}],
|
|
48
|
+
scroll: function scroll(height) {
|
|
49
|
+
return {
|
|
50
|
+
y: height
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
dataSource: tableData.items,
|
|
54
|
+
pagination: false,
|
|
55
|
+
indexColumn: {}
|
|
56
|
+
}));
|
|
57
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseTable } from "../base-table";
|
|
3
|
+
import { tableData } from "./tableData";
|
|
4
|
+
export default (function () {
|
|
5
|
+
return /*#__PURE__*/React.createElement(BaseTable, {
|
|
6
|
+
fieldsConfig: [{
|
|
7
|
+
"title": "编号/状态",
|
|
8
|
+
"dataIndex": "status_name",
|
|
9
|
+
"key": "status_name"
|
|
10
|
+
}, {
|
|
11
|
+
"title": "SPU/组合SKU",
|
|
12
|
+
"dataIndex": "goods_spu_info",
|
|
13
|
+
"key": "goods_spu_info"
|
|
14
|
+
}, {
|
|
15
|
+
"title": "图片",
|
|
16
|
+
"dataIndex": "goods_image",
|
|
17
|
+
"key": "goods_image",
|
|
18
|
+
"align": 'center'
|
|
19
|
+
}, {
|
|
20
|
+
"title": "SKU/属性",
|
|
21
|
+
"dataIndex": "goods_sku_info",
|
|
22
|
+
"key": "goods_sku_info"
|
|
23
|
+
}, {
|
|
24
|
+
"title": "计划员",
|
|
25
|
+
"dataIndex": "planuser",
|
|
26
|
+
"key": "planuser"
|
|
27
|
+
}, {
|
|
28
|
+
"title": "供应商",
|
|
29
|
+
"dataIndex": "factory",
|
|
30
|
+
"key": "factory"
|
|
31
|
+
}, {
|
|
32
|
+
"title": "ASIN",
|
|
33
|
+
"dataIndex": "asin",
|
|
34
|
+
"key": "asin"
|
|
35
|
+
}],
|
|
36
|
+
scroll: function scroll(height) {
|
|
37
|
+
return {
|
|
38
|
+
y: height
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
dataSource: tableData.items,
|
|
42
|
+
pagination: false,
|
|
43
|
+
rowSelection: {}
|
|
44
|
+
});
|
|
45
|
+
});
|