antd-management-fast-develop 1.0.15 → 1.0.17

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.
Files changed (2) hide show
  1. package/package.json +12 -12
  2. package/src/template.js +6 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-management-fast-develop",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -54,13 +54,13 @@
54
54
  "ejs": "^3.1.9"
55
55
  },
56
56
  "devDependencies": {
57
- "@babel/core": "^7.21.3",
57
+ "@babel/core": "^7.21.4",
58
58
  "@babel/eslint-parser": "^7.21.3",
59
59
  "@babel/plugin-external-helpers": "^7.18.6",
60
60
  "@babel/plugin-proposal-class-properties": "^7.18.6",
61
61
  "@babel/plugin-proposal-decorators": "^7.21.0",
62
- "@babel/plugin-transform-runtime": "^7.21.0",
63
- "@babel/preset-env": "^7.20.2",
62
+ "@babel/plugin-transform-runtime": "^7.21.4",
63
+ "@babel/preset-env": "^7.21.4",
64
64
  "@babel/preset-react": "^7.18.6",
65
65
  "@babel/runtime": "^7.21.0",
66
66
  "@commitlint/cli": "^17.5.1",
@@ -70,19 +70,19 @@
70
70
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
71
71
  "@types/jest": "^29.5.0",
72
72
  "@types/node": "^18.15.11",
73
- "@typescript-eslint/parser": "^5.57.0",
74
- "@umijs/max": "^4.0.63",
73
+ "@typescript-eslint/parser": "^5.58.0",
74
+ "@umijs/max": "^4.0.64",
75
75
  "commitizen": "^4.3.0",
76
76
  "conventional-changelog-conventionalcommits": "^5.0.0",
77
77
  "cross-env": "^7.0.3",
78
78
  "documentation": "^14.0.1",
79
79
  "easy-soft-develop": "^2.0.198",
80
- "eslint": "^8.37.0",
80
+ "eslint": "^8.38.0",
81
81
  "eslint-config-airbnb": "^19.0.4",
82
82
  "eslint-config-airbnb-typescript": "^17.0.0",
83
83
  "eslint-config-prettier": "^8.8.0",
84
84
  "eslint-formatter-pretty": "^5.0.0",
85
- "eslint-import-resolver-typescript": "^3.5.3",
85
+ "eslint-import-resolver-typescript": "^3.5.5",
86
86
  "eslint-plugin-eslint-comments": "^3.2.0",
87
87
  "eslint-plugin-import": "^2.27.5",
88
88
  "eslint-plugin-jest": "^27.2.1",
@@ -95,15 +95,15 @@
95
95
  "eslint-plugin-unicorn": "^46.0.0",
96
96
  "husky": "^8.0.3",
97
97
  "jest": "^29.5.0",
98
- "lint-staged": "^13.2.0",
98
+ "lint-staged": "^13.2.1",
99
99
  "prettier": "^2.8.7",
100
100
  "prettier-plugin-organize-imports": "^3.2.2",
101
101
  "prettier-plugin-packagejson": "^2.4.3",
102
102
  "react": "^18.2.0",
103
103
  "react-dnd": "^16.0.1",
104
- "rimraf": "^4.4.1",
105
- "stylelint": "^15.3.0",
104
+ "rimraf": "^5.0.0",
105
+ "stylelint": "^15.4.0",
106
106
  "stylelint-config-prettier": "^9.0.5",
107
- "stylelint-config-standard": "^31.0.0"
107
+ "stylelint-config-standard": "^32.0.0"
108
108
  }
109
109
  }
package/src/template.js CHANGED
@@ -23,6 +23,7 @@ import {
23
23
  buildOptionItem,
24
24
  buildRadioItem,
25
25
  buildSearchFormSelect,
26
+ convertOptionOrRadioData,
26
27
  } from 'antd-management-fast-component';
27
28
  import { getMergeMetaData } from 'antd-management-fast-framework';
28
29
 
@@ -84,7 +85,7 @@ export function renderSearch<%= o.functionSegment %>Select({
84
85
  name,
85
86
  helper,
86
87
  list: refit<%= o.functionSegment %>List({ withUnlimited }),
87
- dataConvert: (o) => o,
88
+ dataConvert: convertOptionOrRadioData,
88
89
  });
89
90
  }
90
91
 
@@ -101,11 +102,7 @@ export function renderCustom<%= o.functionSegment %>Select({
101
102
  separator,
102
103
  size,
103
104
  list: refit<%= o.functionSegment %>List({ withUnlimited: true }),
104
- dataConvert: (o, index) => {
105
- const { flag, name } = o;
106
-
107
- return { index, label: name, value: flag, disabled: false, ...o };
108
- },
105
+ dataConvert: convertOptionOrRadioData,
109
106
  renderItem: null,
110
107
  onChange: onChangeCallback,
111
108
  innerProps: innerProperties,
@@ -128,11 +125,7 @@ export function renderForm<%= o.functionSegment %>Select({
128
125
  name,
129
126
  helper,
130
127
  list: refit<%= o.functionSegment %>List({ withUnlimited: false }),
131
- dataConvert: (o, index) => {
132
- const { flag, name } = o;
133
-
134
- return { index, label: name, value: flag, disabled: false, ...o };
135
- },
128
+ dataConvert: convertOptionOrRadioData,
136
129
  onChange: onChangeCallback,
137
130
  formItemLayout,
138
131
  required,
@@ -153,11 +146,7 @@ export function renderCustom<%= o.functionSegment %>Radio({
153
146
  separator,
154
147
  size,
155
148
  list: refit<%= o.functionSegment %>List({ withUnlimited: true }),
156
- dataConvert: (o, index) => {
157
- const { flag, name } = o;
158
-
159
- return { index, label: name, value: flag, disabled: false, ...o };
160
- },
149
+ dataConvert: convertOptionOrRadioData,
161
150
  renderItem: null,
162
151
  onChange: onChangeCallback,
163
152
  innerProps: innerProperties,
@@ -180,11 +169,7 @@ export function renderForm<%= o.functionSegment %>Radio({
180
169
  name,
181
170
  helper,
182
171
  list: refit<%= o.functionSegment %>List({ withUnlimited: false }),
183
- dataConvert: (o, index) => {
184
- const { flag, name } = o;
185
-
186
- return { index, label: name, value: flag, disabled: false, ...o };
187
- },
172
+ dataConvert: convertOptionOrRadioData,
188
173
  onChange: onChangeCallback,
189
174
  formItemLayout,
190
175
  required,