@zat-design/sisyphus-react 3.4.1 → 3.4.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/index.esm.css +7 -0
- package/es/ProConfigProvider/index.js +8 -1
- package/es/ProEditTable/utils/index.js +6 -4
- package/es/ProEnum/style/index.less +4 -3
- package/es/ProForm/components/base/InputNumber/index.js +3 -0
- package/es/ProForm/components/combination/Group/index.js +19 -2
- package/es/ProForm/components/combination/Group/propsType.d.ts +4 -0
- package/es/ProForm/components/combination/Group/style/index.less +3 -0
- package/es/ProForm/components/render/ConfirmWrapper.js +15 -23
- package/es/ProForm/components/render/Render.js +16 -13
- package/es/ProForm/utils/index.d.ts +2 -0
- package/es/ProForm/utils/index.js +14 -13
- package/es/ProIcon/config/index.d.ts +4 -0
- package/es/ProIcon/config/index.js +199 -0
- package/es/ProIcon/index.js +73 -31
- package/es/ProIcon/propsTypes.d.ts +23 -1
- package/es/ProIcon/symbolIcon.js +1 -1
- package/es/ProTreeModal/style/index.less +8 -0
- package/lib/ProConfigProvider/index.js +8 -1
- package/lib/ProEditTable/utils/index.js +6 -4
- package/lib/ProEnum/style/index.less +4 -3
- package/lib/ProForm/components/base/InputNumber/index.js +3 -0
- package/lib/ProForm/components/combination/Group/index.js +18 -1
- package/lib/ProForm/components/combination/Group/propsType.d.ts +4 -0
- package/lib/ProForm/components/combination/Group/style/index.less +3 -0
- package/lib/ProForm/components/render/ConfirmWrapper.js +15 -23
- package/lib/ProForm/components/render/Render.js +15 -12
- package/lib/ProForm/utils/index.d.ts +2 -0
- package/lib/ProForm/utils/index.js +14 -13
- package/lib/ProIcon/config/index.d.ts +4 -0
- package/lib/ProIcon/config/index.js +205 -0
- package/lib/ProIcon/index.js +73 -31
- package/lib/ProIcon/propsTypes.d.ts +23 -1
- package/lib/ProIcon/symbolIcon.js +1 -1
- package/lib/ProTreeModal/style/index.less +8 -0
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
|
@@ -2297,6 +2297,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2297
2297
|
margin-inline-start: -1px;
|
|
2298
2298
|
border-start-start-radius: 0;
|
|
2299
2299
|
border-end-start-radius: 0;
|
|
2300
|
+
padding: 0 12px;
|
|
2301
|
+
background-color: #fff;
|
|
2302
|
+
cursor: default;
|
|
2300
2303
|
}
|
|
2301
2304
|
.pro-group .ant-space-compact .pro-modal-select {
|
|
2302
2305
|
margin-left: -1px;
|
|
@@ -3447,6 +3450,10 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3447
3450
|
.pro-transfer-right .checked-item {
|
|
3448
3451
|
margin: var(--zaui-space-size-sm, 8px) 0;
|
|
3449
3452
|
}
|
|
3453
|
+
.pro-transfer-right .checked-item.dragable .ant-tag > span:first-child {
|
|
3454
|
+
padding: 8px 0;
|
|
3455
|
+
cursor: move;
|
|
3456
|
+
}
|
|
3450
3457
|
.pro-transfer-right .checked-item:first-child {
|
|
3451
3458
|
margin-top: 0;
|
|
3452
3459
|
}
|
|
@@ -13,7 +13,14 @@ var initialState = {
|
|
|
13
13
|
ProEnum: {
|
|
14
14
|
dics: {}
|
|
15
15
|
},
|
|
16
|
-
forms: {}
|
|
16
|
+
forms: {},
|
|
17
|
+
ProIcon: {
|
|
18
|
+
mode: 'icon',
|
|
19
|
+
mapList: [{
|
|
20
|
+
type: 'view',
|
|
21
|
+
text: '查看'
|
|
22
|
+
}]
|
|
23
|
+
}
|
|
17
24
|
};
|
|
18
25
|
export var ProConfigContext = /*#__PURE__*/React.createContext({
|
|
19
26
|
state: initialState,
|
|
@@ -202,7 +202,9 @@ export var transformColumns = function transformColumns() {
|
|
|
202
202
|
ellipsis = item.ellipsis,
|
|
203
203
|
key = item.key,
|
|
204
204
|
tooltip = item.tooltip,
|
|
205
|
-
suffix = item.suffix
|
|
205
|
+
suffix = item.suffix,
|
|
206
|
+
before = item.before,
|
|
207
|
+
after = item.after;
|
|
206
208
|
// column设置label时,权重最高
|
|
207
209
|
var columnTitle = label || title;
|
|
208
210
|
if (typeof columnTitle === 'string') {
|
|
@@ -214,7 +216,7 @@ export var transformColumns = function transformColumns() {
|
|
|
214
216
|
resetProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
215
217
|
item.title = _jsxs("span", {
|
|
216
218
|
className: "pro-edit-table-title pro-edit-table-tooltip",
|
|
217
|
-
children: [columnTitle, _jsx(_Tooltip, _objectSpread(_objectSpread({
|
|
219
|
+
children: [before, columnTitle, _jsx(_Tooltip, _objectSpread(_objectSpread({
|
|
218
220
|
title: tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : tooltip
|
|
219
221
|
}, resetProps), {}, {
|
|
220
222
|
children: icon ? ( /*#__PURE__*/React.cloneElement(icon, {
|
|
@@ -223,12 +225,12 @@ export var transformColumns = function transformColumns() {
|
|
|
223
225
|
className: "icon-tip",
|
|
224
226
|
src: tipSvg
|
|
225
227
|
})
|
|
226
|
-
})), suffix]
|
|
228
|
+
})), suffix || after]
|
|
227
229
|
});
|
|
228
230
|
} else {
|
|
229
231
|
item.title = _jsxs("span", {
|
|
230
232
|
className: "pro-edit-table-title",
|
|
231
|
-
children: [columnTitle, suffix]
|
|
233
|
+
children: [before, columnTitle, suffix || after]
|
|
232
234
|
});
|
|
233
235
|
}
|
|
234
236
|
}
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
padding: var(--zaui-space-size-sm) var(--zaui-space-border);
|
|
43
43
|
line-height: 18px;
|
|
44
44
|
background-color: #f1f3f6ff;
|
|
45
|
+
border: 1px solid transparent;
|
|
45
46
|
cursor: pointer;
|
|
46
47
|
|
|
47
48
|
&::after {
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
border-top-right-radius: var(--zaui-space-size-xs);
|
|
65
66
|
border-bottom-right-radius: var(--zaui-space-size-xs);
|
|
66
67
|
&::after {
|
|
67
|
-
|
|
68
|
+
background: transparent;
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
}
|
|
@@ -73,12 +74,12 @@
|
|
|
73
74
|
color: var(--zaui-brand);
|
|
74
75
|
border: 1px solid var(--zaui-brand);
|
|
75
76
|
&::after {
|
|
76
|
-
|
|
77
|
+
background: transparent;
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
.pro-enum-group-item-disabled-after::after {
|
|
81
|
-
|
|
82
|
+
background: transparent;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
.pro-enum-group-item-disabled {
|
|
@@ -73,6 +73,9 @@ var InputNumber = function InputNumber(props) {
|
|
|
73
73
|
},
|
|
74
74
|
parser: function parser(value) {
|
|
75
75
|
var num = Number(value.replace(/[\s,]+/g, ''));
|
|
76
|
+
if (value === '') {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
76
79
|
return Number.isNaN(num) ? value : num.toFixed((props === null || props === void 0 ? void 0 : props.precision) || 2);
|
|
77
80
|
}
|
|
78
81
|
};
|
|
@@ -4,9 +4,11 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
4
4
|
import "antd/es/button/style";
|
|
5
5
|
import _Button from "antd/es/button";
|
|
6
6
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
7
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
import { useMemo } from 'react';
|
|
9
|
-
import { omit } from 'lodash';
|
|
10
|
+
import { omit, isFunction } from 'lodash';
|
|
11
|
+
import { useDeepCompareEffect, useCounter } from 'ahooks';
|
|
10
12
|
import classnames from 'classnames';
|
|
11
13
|
import RenderFields from '../../render/RenderFields';
|
|
12
14
|
import { insertSeparator } from './utils';
|
|
@@ -19,7 +21,13 @@ var Group = function Group(props) {
|
|
|
19
21
|
space = _props$space === void 0 ? {
|
|
20
22
|
size: 12
|
|
21
23
|
} : _props$space,
|
|
22
|
-
id = props.id
|
|
24
|
+
id = props.id,
|
|
25
|
+
value = props.value,
|
|
26
|
+
onFieldChange = props.onFieldChange;
|
|
27
|
+
var _useCounter = useCounter(0),
|
|
28
|
+
_useCounter2 = _slicedToArray(_useCounter, 2),
|
|
29
|
+
num = _useCounter2[0],
|
|
30
|
+
inc = _useCounter2[1].inc;
|
|
23
31
|
var _ref = ProForm.useFieldProps() || {},
|
|
24
32
|
names = _ref.names,
|
|
25
33
|
name = _ref.name,
|
|
@@ -56,6 +64,15 @@ var Group = function Group(props) {
|
|
|
56
64
|
return ['Radio', 'Checkbox', 'Switch'].includes(item.type);
|
|
57
65
|
})
|
|
58
66
|
}, "".concat(className), className));
|
|
67
|
+
useDeepCompareEffect(function () {
|
|
68
|
+
// 模拟change,初始化不执行onFieldChange
|
|
69
|
+
if (isFunction(onFieldChange) && num >= 1) {
|
|
70
|
+
onFieldChange(value, form.getFieldsValue(), {
|
|
71
|
+
form: form
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
inc();
|
|
75
|
+
}, [value]);
|
|
59
76
|
return _jsx("div", {
|
|
60
77
|
className: _className,
|
|
61
78
|
children: space.compact || (space === null || space === void 0 ? void 0 : space.separator) ? _jsx(_Space.Compact, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RowProps, SpaceProps } from 'antd';
|
|
3
|
+
import { FormInstance } from 'antd/es/form/Form';
|
|
3
4
|
import { ProColumnProps, ProFormOtherProps } from '../../../propsType';
|
|
4
5
|
export interface SpaceType extends SpaceProps {
|
|
5
6
|
/**
|
|
@@ -22,4 +23,7 @@ export interface GroupProps {
|
|
|
22
23
|
value?: any;
|
|
23
24
|
id?: string;
|
|
24
25
|
disabled?: boolean | (() => void);
|
|
26
|
+
onFieldChange?: (value: any[] | null, record: any, { form, }: {
|
|
27
|
+
form: FormInstance;
|
|
28
|
+
}) => any;
|
|
25
29
|
}
|
|
@@ -8,7 +8,8 @@ import { isFunction, isObject } from 'lodash';
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import ProForm from '../../index';
|
|
10
10
|
var defaultConfirmProps = {
|
|
11
|
-
title: '
|
|
11
|
+
title: '操作提示',
|
|
12
|
+
content: '确定要修改该字段吗?'
|
|
12
13
|
};
|
|
13
14
|
var ConfirmWrapper = function ConfirmWrapper(props) {
|
|
14
15
|
var onChange = props.onChange,
|
|
@@ -22,7 +23,8 @@ var ConfirmWrapper = function ConfirmWrapper(props) {
|
|
|
22
23
|
other[_key - 1] = arguments[_key];
|
|
23
24
|
}
|
|
24
25
|
var _value = (value === null || value === void 0 ? void 0 : value.target) ? value.target.value : value;
|
|
25
|
-
|
|
26
|
+
var confirmProps = isFunction(confirm) ? confirm(form.getFieldsValue()) : confirm;
|
|
27
|
+
if (confirmProps === true) {
|
|
26
28
|
_Modal.confirm(_objectSpread(_objectSpread({}, defaultConfirmProps), {}, {
|
|
27
29
|
onOk: function onOk() {
|
|
28
30
|
return onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, [_value].concat(other));
|
|
@@ -30,28 +32,18 @@ var ConfirmWrapper = function ConfirmWrapper(props) {
|
|
|
30
32
|
}));
|
|
31
33
|
return;
|
|
32
34
|
}
|
|
33
|
-
if (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
}));
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
if (isObject(confirmProps)) {
|
|
44
|
-
_Modal.confirm(_objectSpread(_objectSpread(_objectSpread({}, defaultConfirmProps), confirmProps), {}, {
|
|
45
|
-
onOk: function onOk() {
|
|
46
|
-
for (var _len2 = arguments.length, arg = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
47
|
-
arg[_key2] = arguments[_key2];
|
|
48
|
-
}
|
|
49
|
-
confirmProps === null || confirmProps === void 0 ? void 0 : confirmProps.onOk.apply(confirmProps, arg);
|
|
50
|
-
onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, [_value].concat(other));
|
|
35
|
+
if (isObject(confirmProps)) {
|
|
36
|
+
_Modal.confirm(_objectSpread(_objectSpread(_objectSpread({}, defaultConfirmProps), confirmProps), {}, {
|
|
37
|
+
onOk: function onOk() {
|
|
38
|
+
var _confirmProps$onOk;
|
|
39
|
+
for (var _len2 = arguments.length, arg = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
40
|
+
arg[_key2] = arguments[_key2];
|
|
51
41
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
42
|
+
(_confirmProps$onOk = confirmProps.onOk) === null || _confirmProps$onOk === void 0 ? void 0 : _confirmProps$onOk.call.apply(_confirmProps$onOk, [confirmProps].concat(arg));
|
|
43
|
+
onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, [_value].concat(other));
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
return;
|
|
55
47
|
}
|
|
56
48
|
onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, [_value].concat(other));
|
|
57
49
|
};
|
|
@@ -24,7 +24,7 @@ import classNames from 'classnames';
|
|
|
24
24
|
import { ReactSVG } from 'react-svg';
|
|
25
25
|
import { isFunction, isString, omit } from 'lodash';
|
|
26
26
|
import useShouldUpdate from '../../utils/useShouldUpdate';
|
|
27
|
-
import { isTrim, isUpperCase, findOptionByValue } from '../../utils/index';
|
|
27
|
+
import { isTrim, isUpperCase, findOptionByValue, parseNamePath } from '../../utils/index';
|
|
28
28
|
import { useProConfig } from '../../../ProConfigProvider';
|
|
29
29
|
import transformNames from '../../utils/transformNames';
|
|
30
30
|
import valueTypeMap from '../../utils/valueType';
|
|
@@ -34,7 +34,7 @@ import useRules from '../../utils/useRules';
|
|
|
34
34
|
import ConfirmWrapper from './ConfirmWrapper';
|
|
35
35
|
// 这个组件只管渲染, 参数的整理在外部处理
|
|
36
36
|
var Render = function Render(props) {
|
|
37
|
-
var _ref2, _otherProps$names2;
|
|
37
|
+
var _ref2, _ref3, _otherProps$names2;
|
|
38
38
|
var component = props.component,
|
|
39
39
|
originComponent = props.originComponent,
|
|
40
40
|
_props$formItemProps = props.formItemProps,
|
|
@@ -169,8 +169,8 @@ var Render = function Render(props) {
|
|
|
169
169
|
}
|
|
170
170
|
/** 移除多余参数,防止透传给formItem报错 */
|
|
171
171
|
var _otherFormItemProps = omit(otherFormItemProps, ['component', 'names', 'format', 'toISOString', 'switchValue', 'precision', 'clearNotShow']);
|
|
172
|
-
// 优先级 column.disabled > fieldProps.disabled > formDisabled
|
|
173
|
-
var lastDisabled = (_ref2 = _disabled !== null && _disabled !== void 0 ? _disabled : _fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) !== null && _ref2 !== void 0 ? _ref2 : formDisabled;
|
|
172
|
+
// 优先级 formitem上【column.disabled】 > 组件上【fieldProps.disabled】 > 全局【formDisabled】
|
|
173
|
+
var lastDisabled = (_ref2 = (_ref3 = _disabled !== null && _disabled !== void 0 ? _disabled : _fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) !== null && _ref3 !== void 0 ? _ref3 : componentProps === null || componentProps === void 0 ? void 0 : componentProps.disabled) !== null && _ref2 !== void 0 ? _ref2 : formDisabled;
|
|
174
174
|
/**
|
|
175
175
|
* 最新fieldProps: 更新后的组件Props
|
|
176
176
|
*/
|
|
@@ -198,8 +198,8 @@ var Render = function Render(props) {
|
|
|
198
198
|
var functionArgs = function functionArgs(args) {
|
|
199
199
|
var _otherFormItemProps$n;
|
|
200
200
|
var _args = _toConsumableArray(args);
|
|
201
|
-
var
|
|
202
|
-
valueType =
|
|
201
|
+
var _ref4 = otherProps || {},
|
|
202
|
+
valueType = _ref4.valueType;
|
|
203
203
|
_args[1] = form.getFieldsValue();
|
|
204
204
|
_args[2] = {
|
|
205
205
|
form: form
|
|
@@ -260,8 +260,9 @@ var Render = function Render(props) {
|
|
|
260
260
|
// Group默认校验, 延时与重新setFieldValue,为了解决校验值未同步最新的问题,
|
|
261
261
|
if (formItemProps === null || formItemProps === void 0 ? void 0 : formItemProps.parentNames) {
|
|
262
262
|
setTimeout(function () {
|
|
263
|
-
|
|
264
|
-
form.
|
|
263
|
+
var namePath = parseNamePath(formItemProps === null || formItemProps === void 0 ? void 0 : formItemProps.parentNames);
|
|
264
|
+
form.setFieldValue(formItemProps === null || formItemProps === void 0 ? void 0 : formItemProps.parentNames, form.getFieldValue(namePath));
|
|
265
|
+
form.validateFields(namePath);
|
|
265
266
|
}, 60);
|
|
266
267
|
}
|
|
267
268
|
// ProTreeSelect返回option
|
|
@@ -275,7 +276,7 @@ var Render = function Render(props) {
|
|
|
275
276
|
* onBlur参数重置 (value, record, { form, index, namePath, option }) => void
|
|
276
277
|
*/
|
|
277
278
|
var handleBlur = /*#__PURE__*/function () {
|
|
278
|
-
var
|
|
279
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
279
280
|
var _len2,
|
|
280
281
|
args,
|
|
281
282
|
_key2,
|
|
@@ -302,12 +303,14 @@ var Render = function Render(props) {
|
|
|
302
303
|
}, _callee);
|
|
303
304
|
}));
|
|
304
305
|
return function handleBlur() {
|
|
305
|
-
return
|
|
306
|
+
return _ref5.apply(this, arguments);
|
|
306
307
|
};
|
|
307
308
|
}();
|
|
308
309
|
var renderItem = function renderItem() {
|
|
310
|
+
// 移除多余字段,group保留onFieldChange
|
|
311
|
+
var lastComponentPropsFilter = type === 'Group' ? ['disabledStrictly'] : ['onFieldChange', 'disabledStrictly'];
|
|
309
312
|
// 表单渲染 start
|
|
310
|
-
var childProps = _objectSpread(_objectSpread(_objectSpread({}, AutoComponent === null || AutoComponent === void 0 ? void 0 : AutoComponent.props), omit(lastComponentProps,
|
|
313
|
+
var childProps = _objectSpread(_objectSpread(_objectSpread({}, AutoComponent === null || AutoComponent === void 0 ? void 0 : AutoComponent.props), omit(lastComponentProps, lastComponentPropsFilter)), {}, {
|
|
311
314
|
// @ts-ignore
|
|
312
315
|
otherProps: otherProps,
|
|
313
316
|
onChange: handleChange,
|
|
@@ -350,7 +353,7 @@ var Render = function Render(props) {
|
|
|
350
353
|
if (originComponent) {
|
|
351
354
|
delete childProps.otherProps;
|
|
352
355
|
}
|
|
353
|
-
var child = /*#__PURE__*/React.isValidElement(AutoComponent) ? ( /*#__PURE__*/React.cloneElement(AutoComponent, childProps)) : _jsx(AutoComponent, _objectSpread(_objectSpread({}, omit(lastComponentProps,
|
|
356
|
+
var child = /*#__PURE__*/React.isValidElement(AutoComponent) ? ( /*#__PURE__*/React.cloneElement(AutoComponent, childProps)) : _jsx(AutoComponent, _objectSpread(_objectSpread({}, omit(lastComponentProps, lastComponentPropsFilter)), {}, {
|
|
354
357
|
otherProps: _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
355
358
|
show: show,
|
|
356
359
|
disabled: lastDisabled,
|
|
@@ -385,7 +388,7 @@ var Render = function Render(props) {
|
|
|
385
388
|
name: _otherFormItemProps.name
|
|
386
389
|
}, omit(_otherFormItemProps, ['rules'])), {}, {
|
|
387
390
|
children: function children(fields, operation, meta) {
|
|
388
|
-
return _jsx(AutoComponent, _objectSpread(_objectSpread({}, omit(lastComponentProps,
|
|
391
|
+
return _jsx(AutoComponent, _objectSpread(_objectSpread({}, omit(lastComponentProps, lastComponentPropsFilter)), {}, {
|
|
389
392
|
otherProps: otherProps,
|
|
390
393
|
fields: fields,
|
|
391
394
|
operation: operation,
|
|
@@ -88,4 +88,6 @@ export declare const findOptionByValue: (treeData: any[], value: string | number
|
|
|
88
88
|
* 对比依赖列表中的 值是否变更
|
|
89
89
|
*/
|
|
90
90
|
export declare const equalDependencies: (dependencies: any, prevValues: any, currentValues: any) => any;
|
|
91
|
+
/** 解析namePath */
|
|
92
|
+
export declare const parseNamePath: (input: string) => any;
|
|
91
93
|
export {};
|
|
@@ -4,19 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
4
4
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
5
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
6
|
import { useState } from 'react';
|
|
7
|
-
import _, { isObject, isFunction, cloneDeep, get, set, omit } from 'lodash';
|
|
8
|
-
var colProps = {
|
|
9
|
-
search: {
|
|
10
|
-
span: 8
|
|
11
|
-
},
|
|
12
|
-
drawer: {
|
|
13
|
-
span: 12
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
var footer = {
|
|
17
|
-
search: false,
|
|
18
|
-
drawer: false
|
|
19
|
-
};
|
|
7
|
+
import _, { isObject, isFunction, cloneDeep, get, set, omit, isNaN } from 'lodash';
|
|
20
8
|
export var getLayout = function getLayout(params) {
|
|
21
9
|
var _params$span = params.span,
|
|
22
10
|
span = _params$span === void 0 ? 8 : _params$span,
|
|
@@ -420,4 +408,17 @@ export var equalDependencies = function equalDependencies(dependencies, prevValu
|
|
|
420
408
|
});
|
|
421
409
|
}
|
|
422
410
|
return false;
|
|
411
|
+
};
|
|
412
|
+
/** 解析namePath */
|
|
413
|
+
export var parseNamePath = function parseNamePath(input) {
|
|
414
|
+
var parts = input.split('_');
|
|
415
|
+
if (parts.every(function (item) {
|
|
416
|
+
return isNaN(Number(item));
|
|
417
|
+
})) {
|
|
418
|
+
return [input];
|
|
419
|
+
}
|
|
420
|
+
var result = parts.map(function (item) {
|
|
421
|
+
return isNaN(Number(item)) ? item : Number(item);
|
|
422
|
+
});
|
|
423
|
+
return [result];
|
|
423
424
|
};
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
export var iconMap = [{
|
|
2
|
+
type: 'view',
|
|
3
|
+
text: '查看'
|
|
4
|
+
}, {
|
|
5
|
+
type: '',
|
|
6
|
+
text: '编辑'
|
|
7
|
+
}, {
|
|
8
|
+
type: '',
|
|
9
|
+
text: '查看上传结果'
|
|
10
|
+
}, {
|
|
11
|
+
type: '',
|
|
12
|
+
text: '操作日志'
|
|
13
|
+
}, {
|
|
14
|
+
type: '',
|
|
15
|
+
text: '监管停售'
|
|
16
|
+
}, {
|
|
17
|
+
type: '',
|
|
18
|
+
text: '下架'
|
|
19
|
+
}, {
|
|
20
|
+
type: '',
|
|
21
|
+
text: '上架'
|
|
22
|
+
}, {
|
|
23
|
+
type: '',
|
|
24
|
+
text: '解锁'
|
|
25
|
+
}, {
|
|
26
|
+
type: '',
|
|
27
|
+
text: '审核'
|
|
28
|
+
}, {
|
|
29
|
+
type: '',
|
|
30
|
+
text: '下载导入文件'
|
|
31
|
+
}, {
|
|
32
|
+
type: '',
|
|
33
|
+
text: '删除'
|
|
34
|
+
}, {
|
|
35
|
+
type: '',
|
|
36
|
+
text: '撤回'
|
|
37
|
+
}, {
|
|
38
|
+
type: '',
|
|
39
|
+
text: '再次询价'
|
|
40
|
+
}, {
|
|
41
|
+
type: '',
|
|
42
|
+
text: '复制'
|
|
43
|
+
}, {
|
|
44
|
+
type: '',
|
|
45
|
+
text: '撤回登记'
|
|
46
|
+
}, {
|
|
47
|
+
type: '',
|
|
48
|
+
text: '占号补录'
|
|
49
|
+
}, {
|
|
50
|
+
type: '',
|
|
51
|
+
text: '处理'
|
|
52
|
+
}, {
|
|
53
|
+
type: '',
|
|
54
|
+
text: '释放'
|
|
55
|
+
}, {
|
|
56
|
+
type: '',
|
|
57
|
+
text: '关闭'
|
|
58
|
+
}, {
|
|
59
|
+
type: '',
|
|
60
|
+
text: '认领'
|
|
61
|
+
}, {
|
|
62
|
+
type: '',
|
|
63
|
+
text: '缴费登记'
|
|
64
|
+
}, {
|
|
65
|
+
type: '',
|
|
66
|
+
text: '补传资料'
|
|
67
|
+
}, {
|
|
68
|
+
type: '',
|
|
69
|
+
text: '资料补传确认'
|
|
70
|
+
}, {
|
|
71
|
+
type: '',
|
|
72
|
+
text: '启用'
|
|
73
|
+
}, {
|
|
74
|
+
type: '',
|
|
75
|
+
text: '查勘'
|
|
76
|
+
}, {
|
|
77
|
+
type: '',
|
|
78
|
+
text: '会签处理'
|
|
79
|
+
}, {
|
|
80
|
+
type: '',
|
|
81
|
+
text: '已阅'
|
|
82
|
+
}, {
|
|
83
|
+
type: '',
|
|
84
|
+
text: '下载'
|
|
85
|
+
}, {
|
|
86
|
+
type: '',
|
|
87
|
+
text: '发送'
|
|
88
|
+
}, {
|
|
89
|
+
type: '',
|
|
90
|
+
text: '导出'
|
|
91
|
+
}, {
|
|
92
|
+
type: '',
|
|
93
|
+
text: '设为失效'
|
|
94
|
+
}, {
|
|
95
|
+
type: '',
|
|
96
|
+
text: '复制'
|
|
97
|
+
}, {
|
|
98
|
+
type: '',
|
|
99
|
+
text: '清空'
|
|
100
|
+
}, {
|
|
101
|
+
type: '',
|
|
102
|
+
text: '失效'
|
|
103
|
+
}, {
|
|
104
|
+
type: '',
|
|
105
|
+
text: '预览模版'
|
|
106
|
+
}, {
|
|
107
|
+
type: '',
|
|
108
|
+
text: '中止'
|
|
109
|
+
}, {
|
|
110
|
+
type: '',
|
|
111
|
+
text: '网点'
|
|
112
|
+
}, {
|
|
113
|
+
type: '',
|
|
114
|
+
text: '服务网点'
|
|
115
|
+
}, {
|
|
116
|
+
type: '',
|
|
117
|
+
text: '入口配置'
|
|
118
|
+
}, {
|
|
119
|
+
type: '',
|
|
120
|
+
text: '页面配置'
|
|
121
|
+
}, {
|
|
122
|
+
type: '',
|
|
123
|
+
text: '编辑分配'
|
|
124
|
+
}, {
|
|
125
|
+
type: '',
|
|
126
|
+
text: '查看详情'
|
|
127
|
+
}, {
|
|
128
|
+
type: '',
|
|
129
|
+
text: '投保配置'
|
|
130
|
+
}, {
|
|
131
|
+
type: '',
|
|
132
|
+
text: '推广位配置'
|
|
133
|
+
}, {
|
|
134
|
+
type: '',
|
|
135
|
+
text: '开始合作'
|
|
136
|
+
}, {
|
|
137
|
+
type: '',
|
|
138
|
+
text: '停止合作'
|
|
139
|
+
}, {
|
|
140
|
+
type: '',
|
|
141
|
+
text: '复制链接'
|
|
142
|
+
}, {
|
|
143
|
+
type: '',
|
|
144
|
+
text: '禁用'
|
|
145
|
+
}, {
|
|
146
|
+
type: '',
|
|
147
|
+
text: '编辑配置'
|
|
148
|
+
}, {
|
|
149
|
+
type: '',
|
|
150
|
+
text: '预览'
|
|
151
|
+
}, {
|
|
152
|
+
type: '',
|
|
153
|
+
text: '导出模板'
|
|
154
|
+
}, {
|
|
155
|
+
type: '',
|
|
156
|
+
text: '详情'
|
|
157
|
+
}, {
|
|
158
|
+
type: '',
|
|
159
|
+
text: '终止渠道'
|
|
160
|
+
}, {
|
|
161
|
+
type: '',
|
|
162
|
+
text: '查看发票'
|
|
163
|
+
}, {
|
|
164
|
+
type: '',
|
|
165
|
+
text: '企业认证'
|
|
166
|
+
}, {
|
|
167
|
+
type: '',
|
|
168
|
+
text: 'API授权'
|
|
169
|
+
}, {
|
|
170
|
+
type: '',
|
|
171
|
+
text: '产品授权'
|
|
172
|
+
}, {
|
|
173
|
+
type: '',
|
|
174
|
+
text: '重置密码'
|
|
175
|
+
}, {
|
|
176
|
+
type: '',
|
|
177
|
+
text: '停用'
|
|
178
|
+
}, {
|
|
179
|
+
type: '',
|
|
180
|
+
text: 'API权限'
|
|
181
|
+
}, {
|
|
182
|
+
type: '',
|
|
183
|
+
text: 'IP白名单'
|
|
184
|
+
}, {
|
|
185
|
+
type: '',
|
|
186
|
+
text: '预览模板'
|
|
187
|
+
}, {
|
|
188
|
+
type: '',
|
|
189
|
+
text: '确认'
|
|
190
|
+
}, {
|
|
191
|
+
type: '',
|
|
192
|
+
text: '修改'
|
|
193
|
+
}, {
|
|
194
|
+
type: '',
|
|
195
|
+
text: '查看历史配置'
|
|
196
|
+
}, {
|
|
197
|
+
type: '',
|
|
198
|
+
text: '调整序号'
|
|
199
|
+
}];
|