fan-standard-comp 4.0.1 → 4.0.2
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/fan-standard-comp.min.css +1 -1
- package/dist/fan-standard-comp.min.js +1 -1
- package/es/ButtonGroup/index.d.ts +7 -1
- package/es/ButtonGroup/index.js +47 -27
- package/es/StandardDragModal/DraggableModal.d.ts +2 -2
- package/es/StandardDragModal/Modal.d.ts +1 -1
- package/es/StandardForm/StepForm.js +32 -22
- package/es/StandardForm/TabForm.js +27 -23
- package/es/StandardForm/index.js +47 -38
- package/es/StandardForm/style/index.js +17 -12
- package/es/StandardTable/index.d.ts +3 -2
- package/es/StandardTable/index.js +27 -13
- package/es/StandardTable/style/index.js +1 -0
- package/es/StandardTable/style/index.less +13 -9
- package/es/utils/filterPermission.d.ts +1 -1
- package/es/utils/filterPermission.js +1 -1
- package/lib/ButtonGroup/index.d.ts +7 -1
- package/lib/ButtonGroup/index.js +46 -26
- package/lib/StandardDragModal/DraggableModal.d.ts +2 -2
- package/lib/StandardDragModal/Modal.d.ts +1 -1
- package/lib/StandardForm/StepForm.js +31 -21
- package/lib/StandardForm/TabForm.js +26 -22
- package/lib/StandardForm/index.js +46 -37
- package/lib/StandardForm/style/index.js +17 -12
- package/lib/StandardTable/index.d.ts +3 -2
- package/lib/StandardTable/index.js +27 -13
- package/lib/StandardTable/style/index.js +1 -0
- package/lib/StandardTable/style/index.less +13 -9
- package/lib/utils/filterPermission.d.ts +1 -1
- package/lib/utils/filterPermission.js +1 -1
- package/package.json +2 -2
|
@@ -17,10 +17,11 @@ interface StandardTableProps {
|
|
|
17
17
|
rowSelection?: any;
|
|
18
18
|
orderNumber?: object;
|
|
19
19
|
columnsConfig?: object;
|
|
20
|
-
buttonGroup?:
|
|
20
|
+
buttonGroup?: any[];
|
|
21
21
|
title?: React.ReactNode | string;
|
|
22
22
|
min?: number;
|
|
23
|
-
buttonGroupConfig?:
|
|
23
|
+
buttonGroupConfig?: any[];
|
|
24
|
+
batchButtonGroup?: any[];
|
|
24
25
|
[k: string]: any;
|
|
25
26
|
}
|
|
26
27
|
declare const StandardTable: FC<StandardTableProps>;
|
|
@@ -11,8 +11,9 @@ var _antd = require("antd");
|
|
|
11
11
|
var _index = _interopRequireDefault(require("../ButtonGroup/index"));
|
|
12
12
|
require("./style/index.less");
|
|
13
13
|
var _ConfigContext = require("../ConfigContext");
|
|
14
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
14
15
|
var _index3 = _interopRequireDefault(require("./style/index"));
|
|
15
|
-
var _excluded = ["data", "rowKey", "rowSelection", "columns", "hideOrderNumber", "orderNumber", "className", "emptyText", "codes", "permissionCodes", "columnsConfig", "title", "buttonGroup", "buttonGroupConfig", "min"];
|
|
16
|
+
var _excluded = ["data", "rowKey", "rowSelection", "columns", "hideOrderNumber", "orderNumber", "className", "emptyText", "codes", "permissionCodes", "columnsConfig", "title", "buttonGroup", "buttonGroupConfig", "min", "batchButtonGroup"];
|
|
16
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -59,11 +60,11 @@ var StandardTable = function StandardTable(props) {
|
|
|
59
60
|
buttonGroup = _providerConfig$props.buttonGroup,
|
|
60
61
|
buttonGroupConfig = _providerConfig$props.buttonGroupConfig,
|
|
61
62
|
min = _providerConfig$props.min,
|
|
63
|
+
batchButtonGroup = _providerConfig$props.batchButtonGroup,
|
|
62
64
|
rest = _objectWithoutProperties(_providerConfig$props, _excluded);
|
|
63
|
-
|
|
64
65
|
// 加上类型修复 TS:2322 报警
|
|
65
66
|
var resetColumns = [_objectSpread(_objectSpread({
|
|
66
|
-
width:
|
|
67
|
+
width: 62,
|
|
67
68
|
align: 'center',
|
|
68
69
|
title: '序号',
|
|
69
70
|
key: 'orderNum',
|
|
@@ -148,22 +149,35 @@ var StandardTable = function StandardTable(props) {
|
|
|
148
149
|
});
|
|
149
150
|
resetColumns = hideOrderNumber ? recombinationColumns : resetColumns.concat(recombinationColumns);
|
|
150
151
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
var RenderExtraButtonGroup = function RenderExtraButtonGroup(exProps) {
|
|
153
|
+
// @ts-ignore
|
|
154
|
+
var _providerConfig$props5 = _objectSpread(_objectSpread({}, providerConfig), props),
|
|
155
|
+
rowSelection = _providerConfig$props5.rowSelection;
|
|
156
|
+
var buttonGroup = exProps.buttonGroup,
|
|
157
|
+
batchButtonGroup = exProps.batchButtonGroup;
|
|
158
|
+
// 只有配置rowSelection才显示对应的批量按钮组
|
|
159
|
+
var list = _lodash.default.unionBy(rowSelection && (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.type) !== 'radio' && (batchButtonGroup || []), buttonGroup || []);
|
|
160
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
161
|
+
options: list,
|
|
157
162
|
min: min,
|
|
158
163
|
codes: codes,
|
|
159
164
|
permissionCodes: permissionCodes,
|
|
160
165
|
dropdownConfig: buttonGroupConfig
|
|
161
|
-
})
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
return wrapSSR( /*#__PURE__*/_react.default.createElement(_antd.Card, {
|
|
169
|
+
className: (0, _classnames.default)(componentName, 'standard-table', className, hashId),
|
|
170
|
+
bordered: false,
|
|
171
|
+
title: title,
|
|
172
|
+
extra: /*#__PURE__*/_react.default.createElement(RenderExtraButtonGroup, {
|
|
173
|
+
buttonGroup: buttonGroup,
|
|
174
|
+
batchButtonGroup: batchButtonGroup
|
|
175
|
+
})
|
|
162
176
|
}, /*#__PURE__*/_react.default.createElement(_antd.Table, _extends({
|
|
163
177
|
rowKey: rowKey || 'id',
|
|
164
|
-
rowSelection: rowSelection ? _objectSpread(
|
|
165
|
-
columnWidth:
|
|
166
|
-
}) : rowSelection,
|
|
178
|
+
rowSelection: rowSelection ? _objectSpread({
|
|
179
|
+
columnWidth: 46
|
|
180
|
+
}, rowSelection) : rowSelection,
|
|
167
181
|
dataSource: list,
|
|
168
182
|
pagination: !pagination ? false : paginationProps,
|
|
169
183
|
columns: resetColumns,
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
.ant-pagination-total-text {
|
|
18
18
|
float: left;
|
|
19
|
+
flex:1;
|
|
20
|
+
text-align: left;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
.ant-pagination-options-size-changer.ant-select {
|
|
@@ -79,6 +81,8 @@
|
|
|
79
81
|
.spec-pagination {
|
|
80
82
|
.ant-pagination-total-text {
|
|
81
83
|
float: left;
|
|
84
|
+
flex:1;
|
|
85
|
+
text-align: left;
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
|
|
@@ -136,15 +140,15 @@
|
|
|
136
140
|
|
|
137
141
|
.ant-table-tbody > tr > td {
|
|
138
142
|
//padding: 12px @padding-md/2;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
143
|
+
//&:first-child {
|
|
144
|
+
// //padding-left: @padding-md;
|
|
145
|
+
// border-left: 1px solid transparent;
|
|
146
|
+
//}
|
|
147
|
+
//
|
|
148
|
+
//&:last-child {
|
|
149
|
+
// //padding-right: @padding-md;
|
|
150
|
+
// border-right: 1px solid transparent;
|
|
151
|
+
//}
|
|
148
152
|
}
|
|
149
153
|
|
|
150
154
|
.ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const btnClickFunc: (fn: any, params?: {}) => any;
|
|
2
2
|
declare const btnIsDisabled: (isDisabled: any, params?: {}) => any;
|
|
3
3
|
declare const btnIsHide: (isHide: any, params?: {}) => any;
|
|
4
|
-
declare const removeNoPermission: (array: any, permissionCodes: any, codes: any, params: any) =>
|
|
4
|
+
declare const removeNoPermission: (array: any, permissionCodes: any, codes: any, params: any) => any[];
|
|
5
5
|
export { removeNoPermission, btnIsHide, btnIsDisabled, btnClickFunc };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fan-standard-comp",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "FZ standard-comp,basic of antd5.0 and custom component.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@babel/preset-react": "^7.24.1",
|
|
86
86
|
"@types/lodash": "^4.17.0",
|
|
87
87
|
"ant-design-draggable-modal": "^1.0.0",
|
|
88
|
-
"antd": "
|
|
88
|
+
"antd": "5.18.1",
|
|
89
89
|
"antd-style": "^3.6.1",
|
|
90
90
|
"babel": "^6.23.0",
|
|
91
91
|
"dayjs": "^1.11.10",
|