@zat-design/sisyphus-react 3.12.0-beta.5 → 3.12.0-beta.7
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/es/ProEditTable/utils/tools.d.ts +1 -1
- package/es/ProEditTable/utils/tools.js +13 -1
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +7 -7
- package/lib/ProEditTable/utils/tools.d.ts +1 -1
- package/lib/ProEditTable/utils/tools.js +13 -1
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +6 -6
- package/package.json +1 -1
@@ -45,7 +45,7 @@ export declare const onDelete: ({ name, form, virtualKey, selectedRowKeys, }: {
|
|
45
45
|
selectedRowKeys: Key[];
|
46
46
|
}) => void;
|
47
47
|
/**
|
48
|
-
* 获取最终的disabled,
|
48
|
+
* 获取最终的disabled, 两种模式【子级优先,全局优先】
|
49
49
|
* 全局优先:globalControl为true时,全局控制
|
50
50
|
* 子级优先:globalControl为false时,子级控制
|
51
51
|
* @param params 禁用参数
|
@@ -106,7 +106,7 @@ export var onDelete = function onDelete(_ref) {
|
|
106
106
|
}
|
107
107
|
};
|
108
108
|
/**
|
109
|
-
* 获取最终的disabled,
|
109
|
+
* 获取最终的disabled, 两种模式【子级优先,全局优先】
|
110
110
|
* 全局优先:globalControl为true时,全局控制
|
111
111
|
* 子级优先:globalControl为false时,子级控制
|
112
112
|
* @param params 禁用参数
|
@@ -154,6 +154,18 @@ export var getDisabled = function getDisabled(_ref2) {
|
|
154
154
|
if (rowDisabled === 'empty') {
|
155
155
|
return false;
|
156
156
|
}
|
157
|
+
// 日期范围选择器和数字范围选择器
|
158
|
+
if (['RangePicker', 'ProNumberRange', 'Group'].includes(column.type)) {
|
159
|
+
if (Array.isArray(columnFieldProps === null || columnFieldProps === void 0 ? void 0 : columnFieldProps.disabled)) {
|
160
|
+
return columnFieldProps === null || columnFieldProps === void 0 ? void 0 : columnFieldProps.disabled;
|
161
|
+
}
|
162
|
+
if (Array.isArray(column === null || column === void 0 ? void 0 : column.disabled)) {
|
163
|
+
return column.disabled;
|
164
|
+
}
|
165
|
+
if (isFunction(column === null || column === void 0 ? void 0 : column.disabled)) {
|
166
|
+
return column === null || column === void 0 ? void 0 : column.disabled.apply(column, _toConsumableArray(params));
|
167
|
+
}
|
168
|
+
}
|
157
169
|
// 当表单含有diabled属性时,优先使用表单的disabled
|
158
170
|
if (isFunction(rowDisabled) && noColumnDisabled()) {
|
159
171
|
return rowDisabled(params[1]);
|
@@ -15,7 +15,7 @@ import { createElement as _createElement } from "react";
|
|
15
15
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
16
16
|
import { isFunction, omit } from 'lodash';
|
17
17
|
import { useMemo } from 'react';
|
18
|
-
import { CopyOutlined,
|
18
|
+
import { CopyOutlined, PlusSquareOutlined, ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons';
|
19
19
|
import ProIcon from '../../../../../ProIcon';
|
20
20
|
import locale from '../../../../../locale';
|
21
21
|
var filterKeys = ['actionType'];
|
@@ -40,7 +40,7 @@ var getDefaultActions = function getDefaultActions(mode) {
|
|
40
40
|
var remove = operation.remove;
|
41
41
|
remove(index);
|
42
42
|
},
|
43
|
-
label:
|
43
|
+
label: locale.ProForm.formListActions[1],
|
44
44
|
icon: mode === 'less' ? _jsx(ProIcon, {
|
45
45
|
type: "solid-close",
|
46
46
|
className: "single-delete",
|
@@ -58,7 +58,7 @@ var getDefaultActions = function getDefaultActions(mode) {
|
|
58
58
|
var add = operation.add;
|
59
59
|
add(record, index + 1);
|
60
60
|
},
|
61
|
-
label:
|
61
|
+
label: locale.ProForm.formListActions[2],
|
62
62
|
icon: _jsx(CopyOutlined, {})
|
63
63
|
},
|
64
64
|
moveUp: {
|
@@ -69,8 +69,8 @@ var getDefaultActions = function getDefaultActions(mode) {
|
|
69
69
|
var move = operation.move;
|
70
70
|
move(index, index - 1);
|
71
71
|
},
|
72
|
-
label:
|
73
|
-
icon: _jsx(
|
72
|
+
label: locale.ProForm.formListActions[3],
|
73
|
+
icon: _jsx(ArrowUpOutlined, {})
|
74
74
|
},
|
75
75
|
moveDown: {
|
76
76
|
onClick: function onClick(record, _ref5) {
|
@@ -80,8 +80,8 @@ var getDefaultActions = function getDefaultActions(mode) {
|
|
80
80
|
var move = operation.move;
|
81
81
|
move(index, index + 1);
|
82
82
|
},
|
83
|
-
label:
|
84
|
-
icon: _jsx(
|
83
|
+
label: locale.ProForm.formListActions[4],
|
84
|
+
icon: _jsx(ArrowDownOutlined, {})
|
85
85
|
}
|
86
86
|
};
|
87
87
|
if (mode === 'block') {
|
@@ -45,7 +45,7 @@ export declare const onDelete: ({ name, form, virtualKey, selectedRowKeys, }: {
|
|
45
45
|
selectedRowKeys: Key[];
|
46
46
|
}) => void;
|
47
47
|
/**
|
48
|
-
* 获取最终的disabled,
|
48
|
+
* 获取最终的disabled, 两种模式【子级优先,全局优先】
|
49
49
|
* 全局优先:globalControl为true时,全局控制
|
50
50
|
* 子级优先:globalControl为false时,子级控制
|
51
51
|
* @param params 禁用参数
|
@@ -115,7 +115,7 @@ var onDelete = exports.onDelete = function onDelete(_ref) {
|
|
115
115
|
}
|
116
116
|
};
|
117
117
|
/**
|
118
|
-
* 获取最终的disabled,
|
118
|
+
* 获取最终的disabled, 两种模式【子级优先,全局优先】
|
119
119
|
* 全局优先:globalControl为true时,全局控制
|
120
120
|
* 子级优先:globalControl为false时,子级控制
|
121
121
|
* @param params 禁用参数
|
@@ -163,6 +163,18 @@ var getDisabled = exports.getDisabled = function getDisabled(_ref2) {
|
|
163
163
|
if (rowDisabled === 'empty') {
|
164
164
|
return false;
|
165
165
|
}
|
166
|
+
// 日期范围选择器和数字范围选择器
|
167
|
+
if (['RangePicker', 'ProNumberRange', 'Group'].includes(column.type)) {
|
168
|
+
if (Array.isArray(columnFieldProps === null || columnFieldProps === void 0 ? void 0 : columnFieldProps.disabled)) {
|
169
|
+
return columnFieldProps === null || columnFieldProps === void 0 ? void 0 : columnFieldProps.disabled;
|
170
|
+
}
|
171
|
+
if (Array.isArray(column === null || column === void 0 ? void 0 : column.disabled)) {
|
172
|
+
return column.disabled;
|
173
|
+
}
|
174
|
+
if ((0, _lodash.isFunction)(column === null || column === void 0 ? void 0 : column.disabled)) {
|
175
|
+
return column === null || column === void 0 ? void 0 : column.disabled.apply(column, (0, _toConsumableArray2.default)(params));
|
176
|
+
}
|
177
|
+
}
|
166
178
|
// 当表单含有diabled属性时,优先使用表单的disabled
|
167
179
|
if ((0, _lodash.isFunction)(rowDisabled) && noColumnDisabled()) {
|
168
180
|
return rowDisabled(params[1]);
|
@@ -41,7 +41,7 @@ var getDefaultActions = function getDefaultActions(mode) {
|
|
41
41
|
var remove = operation.remove;
|
42
42
|
remove(index);
|
43
43
|
},
|
44
|
-
label:
|
44
|
+
label: _locale.default.ProForm.formListActions[1],
|
45
45
|
icon: mode === 'less' ? (0, _jsxRuntime.jsx)(_ProIcon.default, {
|
46
46
|
type: "solid-close",
|
47
47
|
className: "single-delete",
|
@@ -59,7 +59,7 @@ var getDefaultActions = function getDefaultActions(mode) {
|
|
59
59
|
var add = operation.add;
|
60
60
|
add(record, index + 1);
|
61
61
|
},
|
62
|
-
label:
|
62
|
+
label: _locale.default.ProForm.formListActions[2],
|
63
63
|
icon: (0, _jsxRuntime.jsx)(_icons.CopyOutlined, {})
|
64
64
|
},
|
65
65
|
moveUp: {
|
@@ -70,8 +70,8 @@ var getDefaultActions = function getDefaultActions(mode) {
|
|
70
70
|
var move = operation.move;
|
71
71
|
move(index, index - 1);
|
72
72
|
},
|
73
|
-
label:
|
74
|
-
icon: (0, _jsxRuntime.jsx)(_icons.
|
73
|
+
label: _locale.default.ProForm.formListActions[3],
|
74
|
+
icon: (0, _jsxRuntime.jsx)(_icons.ArrowUpOutlined, {})
|
75
75
|
},
|
76
76
|
moveDown: {
|
77
77
|
onClick: function onClick(record, _ref5) {
|
@@ -81,8 +81,8 @@ var getDefaultActions = function getDefaultActions(mode) {
|
|
81
81
|
var move = operation.move;
|
82
82
|
move(index, index + 1);
|
83
83
|
},
|
84
|
-
label:
|
85
|
-
icon: (0, _jsxRuntime.jsx)(_icons.
|
84
|
+
label: _locale.default.ProForm.formListActions[4],
|
85
|
+
icon: (0, _jsxRuntime.jsx)(_icons.ArrowDownOutlined, {})
|
86
86
|
}
|
87
87
|
};
|
88
88
|
if (mode === 'block') {
|