@zat-design/sisyphus-react 3.3.0-beta.4 → 3.3.0-beta.6
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/ProEnum/index.js +4 -15
- package/es/ProEnum/propsType.d.ts +1 -0
- package/lib/ProEnum/index.js +4 -15
- package/lib/ProEnum/propsType.d.ts +1 -0
- package/package.json +1 -1
package/es/ProEnum/index.js
CHANGED
|
@@ -79,7 +79,6 @@ var ProEnum = function ProEnum(props) {
|
|
|
79
79
|
var _useProConfig = useProConfig('ProEnum'),
|
|
80
80
|
_useProConfig$dics = _useProConfig.dics,
|
|
81
81
|
dics = _useProConfig$dics === void 0 ? {} : _useProConfig$dics;
|
|
82
|
-
// const enumList = dics?.[code] || [];
|
|
83
82
|
var _useRequestFunc = useRequestFunc(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, _objectSpread(_objectSpread({
|
|
84
83
|
manual: true,
|
|
85
84
|
cacheTime: -1
|
|
@@ -174,25 +173,15 @@ var ProEnum = function ProEnum(props) {
|
|
|
174
173
|
}));
|
|
175
174
|
case 'Radio':
|
|
176
175
|
return _jsx(_Radio.Group, _objectSpread(_objectSpread({}, enumProps), {}, {
|
|
176
|
+
options: list,
|
|
177
177
|
value: value,
|
|
178
|
-
onChange: onChange
|
|
179
|
-
children: list.map(function (item) {
|
|
180
|
-
return _jsx(_Radio, {
|
|
181
|
-
value: item[fieldValue],
|
|
182
|
-
children: item[label]
|
|
183
|
-
}, item[fieldValue]);
|
|
184
|
-
})
|
|
178
|
+
onChange: onChange
|
|
185
179
|
}));
|
|
186
180
|
case 'Checkbox':
|
|
187
181
|
return _jsx(_Checkbox.Group, _objectSpread(_objectSpread({}, enumProps), {}, {
|
|
182
|
+
options: list,
|
|
188
183
|
value: value,
|
|
189
|
-
onChange: onChange
|
|
190
|
-
children: list.map(function (item) {
|
|
191
|
-
return _jsx(_Checkbox, {
|
|
192
|
-
value: item[fieldValue],
|
|
193
|
-
children: item[label]
|
|
194
|
-
}, item[fieldValue]);
|
|
195
|
-
})
|
|
184
|
+
onChange: onChange
|
|
196
185
|
}));
|
|
197
186
|
case 'Tag':
|
|
198
187
|
return _jsx(ProEnumTag, {
|
package/lib/ProEnum/index.js
CHANGED
|
@@ -80,7 +80,6 @@ var ProEnum = function ProEnum(props) {
|
|
|
80
80
|
var _useProConfig = (0, _ProConfigProvider.useProConfig)('ProEnum'),
|
|
81
81
|
_useProConfig$dics = _useProConfig.dics,
|
|
82
82
|
dics = _useProConfig$dics === void 0 ? {} : _useProConfig$dics;
|
|
83
|
-
// const enumList = dics?.[code] || [];
|
|
84
83
|
var _useRequestFunc = (0, _ahooks.useRequest)(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
85
84
|
manual: true,
|
|
86
85
|
cacheTime: -1
|
|
@@ -175,25 +174,15 @@ var ProEnum = function ProEnum(props) {
|
|
|
175
174
|
}));
|
|
176
175
|
case 'Radio':
|
|
177
176
|
return (0, _jsxRuntime.jsx)(_antd.Radio.Group, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, enumProps), {}, {
|
|
177
|
+
options: list,
|
|
178
178
|
value: value,
|
|
179
|
-
onChange: onChange
|
|
180
|
-
children: list.map(function (item) {
|
|
181
|
-
return (0, _jsxRuntime.jsx)(_antd.Radio, {
|
|
182
|
-
value: item[fieldValue],
|
|
183
|
-
children: item[label]
|
|
184
|
-
}, item[fieldValue]);
|
|
185
|
-
})
|
|
179
|
+
onChange: onChange
|
|
186
180
|
}));
|
|
187
181
|
case 'Checkbox':
|
|
188
182
|
return (0, _jsxRuntime.jsx)(_antd.Checkbox.Group, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, enumProps), {}, {
|
|
183
|
+
options: list,
|
|
189
184
|
value: value,
|
|
190
|
-
onChange: onChange
|
|
191
|
-
children: list.map(function (item) {
|
|
192
|
-
return (0, _jsxRuntime.jsx)(_antd.Checkbox, {
|
|
193
|
-
value: item[fieldValue],
|
|
194
|
-
children: item[label]
|
|
195
|
-
}, item[fieldValue]);
|
|
196
|
-
})
|
|
185
|
+
onChange: onChange
|
|
197
186
|
}));
|
|
198
187
|
case 'Tag':
|
|
199
188
|
return (0, _jsxRuntime.jsx)(_Tag.default, {
|