@zat-design/sisyphus-react 3.3.0-beta.4 → 3.3.0-beta.5

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.
@@ -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
@@ -161,6 +160,7 @@ var ProEnum = function ProEnum(props) {
161
160
  onChange: onChange
162
161
  }));
163
162
  }
163
+ console.log(list);
164
164
  switch (type) {
165
165
  case 'ProSelect':
166
166
  return _jsx(ProSelect, _objectSpread(_objectSpread({}, enumProps), {}, {
@@ -174,25 +174,15 @@ var ProEnum = function ProEnum(props) {
174
174
  }));
175
175
  case 'Radio':
176
176
  return _jsx(_Radio.Group, _objectSpread(_objectSpread({}, enumProps), {}, {
177
+ options: list,
177
178
  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
- })
179
+ onChange: onChange
185
180
  }));
186
181
  case 'Checkbox':
187
182
  return _jsx(_Checkbox.Group, _objectSpread(_objectSpread({}, enumProps), {}, {
183
+ options: list,
188
184
  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
- })
185
+ onChange: onChange
196
186
  }));
197
187
  case 'Tag':
198
188
  return _jsx(ProEnumTag, {
@@ -6,6 +6,7 @@ import { PropSelectProps } from '../ProSelect/propsType';
6
6
  export interface DataOption {
7
7
  label?: string;
8
8
  value?: string;
9
+ disabled?: boolean;
9
10
  [key: string]: any;
10
11
  }
11
12
  export interface ProEnumConfig {
@@ -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
@@ -162,6 +161,7 @@ var ProEnum = function ProEnum(props) {
162
161
  onChange: onChange
163
162
  }));
164
163
  }
164
+ console.log(list);
165
165
  switch (type) {
166
166
  case 'ProSelect':
167
167
  return (0, _jsxRuntime.jsx)(_ProSelect.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, enumProps), {}, {
@@ -175,25 +175,15 @@ var ProEnum = function ProEnum(props) {
175
175
  }));
176
176
  case 'Radio':
177
177
  return (0, _jsxRuntime.jsx)(_antd.Radio.Group, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, enumProps), {}, {
178
+ options: list,
178
179
  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
- })
180
+ onChange: onChange
186
181
  }));
187
182
  case 'Checkbox':
188
183
  return (0, _jsxRuntime.jsx)(_antd.Checkbox.Group, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, enumProps), {}, {
184
+ options: list,
189
185
  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
- })
186
+ onChange: onChange
197
187
  }));
198
188
  case 'Tag':
199
189
  return (0, _jsxRuntime.jsx)(_Tag.default, {
@@ -6,6 +6,7 @@ import { PropSelectProps } from '../ProSelect/propsType';
6
6
  export interface DataOption {
7
7
  label?: string;
8
8
  value?: string;
9
+ disabled?: boolean;
9
10
  [key: string]: any;
10
11
  }
11
12
  export interface ProEnumConfig {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.3.0-beta.4",
3
+ "version": "3.3.0-beta.5",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",