antd-management-fast-develop 1.0.8 → 1.0.11
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/package.json +7 -7
- package/src/cliCollection/generate.js +1 -1
- package/src/template.js +12 -18
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "antd-management-fast-develop",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.11",
|
4
4
|
"description": "",
|
5
5
|
"license": "ISC",
|
6
6
|
"author": "",
|
@@ -68,18 +68,18 @@
|
|
68
68
|
"@commitlint/cz-commitlint": "^17.4.4",
|
69
69
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
|
70
70
|
"@types/jest": "^29.5.0",
|
71
|
-
"@types/node": "^18.15.
|
72
|
-
"@typescript-eslint/parser": "^5.
|
73
|
-
"@umijs/max": "^4.0.
|
71
|
+
"@types/node": "^18.15.5",
|
72
|
+
"@typescript-eslint/parser": "^5.56.0",
|
73
|
+
"@umijs/max": "^4.0.62",
|
74
74
|
"commitizen": "^4.3.0",
|
75
75
|
"conventional-changelog-conventionalcommits": "^5.0.0",
|
76
76
|
"cross-env": "^7.0.3",
|
77
77
|
"documentation": "^14.0.1",
|
78
|
-
"easy-soft-develop": "^2.0.
|
78
|
+
"easy-soft-develop": "^2.0.191",
|
79
79
|
"eslint": "^8.36.0",
|
80
80
|
"eslint-config-airbnb": "^19.0.4",
|
81
81
|
"eslint-config-airbnb-typescript": "^17.0.0",
|
82
|
-
"eslint-config-prettier": "^8.
|
82
|
+
"eslint-config-prettier": "^8.8.0",
|
83
83
|
"eslint-formatter-pretty": "^5.0.0",
|
84
84
|
"eslint-import-resolver-typescript": "^3.5.3",
|
85
85
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
@@ -95,7 +95,7 @@
|
|
95
95
|
"husky": "^8.0.3",
|
96
96
|
"jest": "^29.5.0",
|
97
97
|
"lint-staged": "^13.2.0",
|
98
|
-
"prettier": "^2.8.
|
98
|
+
"prettier": "^2.8.6",
|
99
99
|
"prettier-plugin-organize-imports": "^3.2.2",
|
100
100
|
"prettier-plugin-packagejson": "^2.4.3",
|
101
101
|
"react": "^18.2.0",
|
package/src/template.js
CHANGED
@@ -12,6 +12,7 @@ import {
|
|
12
12
|
} from 'easy-soft-utility';
|
13
13
|
|
14
14
|
import {
|
15
|
+
getMetaData,
|
15
16
|
unknownLabel,
|
16
17
|
unlimitedWithStringFlag,
|
17
18
|
} from 'antd-management-fast-common';
|
@@ -25,10 +26,10 @@ import {
|
|
25
26
|
buildSearchFormSelect,
|
26
27
|
} from 'antd-management-fast-component';
|
27
28
|
|
28
|
-
export function refit<%= o.functionSegment %>List({
|
29
|
+
export function refit<%= o.functionSegment %>List({ withUnlimited = true }) {
|
29
30
|
const { <%= o.defineName %>List: list } = {
|
30
31
|
<%= o.defineName %>List: [],
|
31
|
-
...
|
32
|
+
...getMetaData(),
|
32
33
|
};
|
33
34
|
|
34
35
|
if (withUnlimited) {
|
@@ -38,7 +39,7 @@ export function refit<%= o.functionSegment %>List({ metaData, withUnlimited = tr
|
|
38
39
|
return refitCommonData(list);
|
39
40
|
}
|
40
41
|
|
41
|
-
export function get<%= o.functionSegment %>Name({
|
42
|
+
export function get<%= o.functionSegment %>Name({ value, defaultValue = '' }) {
|
42
43
|
if (isInvalid(value)) {
|
43
44
|
return defaultValue;
|
44
45
|
}
|
@@ -46,34 +47,31 @@ export function get<%= o.functionSegment %>Name({ metaData, value, defaultValue
|
|
46
47
|
const item = searchFromList(
|
47
48
|
'flag',
|
48
49
|
\`\${isNull(isUndefined(value) ? null : value) ? '' : value}\`,
|
49
|
-
refit<%= o.functionSegment %>List({
|
50
|
+
refit<%= o.functionSegment %>List({ withUnlimited: false }),
|
50
51
|
);
|
51
52
|
|
52
53
|
return item == null ? '未知' : item.name;
|
53
54
|
}
|
54
55
|
|
55
56
|
export function render<%= o.functionSegment %>Option({
|
56
|
-
metaData,
|
57
57
|
withUnlimited = true,
|
58
58
|
adjustListDataCallback = null,
|
59
59
|
}) {
|
60
|
-
const listData = refit<%= o.functionSegment %>List({
|
60
|
+
const listData = refit<%= o.functionSegment %>List({ withUnlimited });
|
61
61
|
|
62
62
|
return buildOptionItem({ list: listData, adjustListDataCallback });
|
63
63
|
}
|
64
64
|
|
65
65
|
export function render<%= o.functionSegment %>Radio({
|
66
|
-
metaData,
|
67
66
|
withUnlimited = true,
|
68
67
|
adjustListDataCallback = null,
|
69
68
|
}) {
|
70
|
-
const listData = refit<%= o.functionSegment %>List({
|
69
|
+
const listData = refit<%= o.functionSegment %>List({ withUnlimited });
|
71
70
|
|
72
71
|
return buildRadioItem({ list: listData, adjustListDataCallback });
|
73
72
|
}
|
74
73
|
|
75
74
|
export function renderSearch<%= o.functionSegment %>Select({
|
76
|
-
metaData = null,
|
77
75
|
withUnlimited = true,
|
78
76
|
label = '<%= o.label %>',
|
79
77
|
name = '<%= o.name %>',
|
@@ -85,13 +83,12 @@ export function renderSearch<%= o.functionSegment %>Select({
|
|
85
83
|
label: title,
|
86
84
|
name,
|
87
85
|
helper,
|
88
|
-
list: refit<%= o.functionSegment %>List({
|
86
|
+
list: refit<%= o.functionSegment %>List({ withUnlimited }),
|
89
87
|
dataConvert: (o) => o,
|
90
88
|
});
|
91
89
|
}
|
92
90
|
|
93
91
|
export function renderCustom<%= o.functionSegment %>Select({
|
94
|
-
metaData = null,
|
95
92
|
label = '<%= o.label %>',
|
96
93
|
separator = ':',
|
97
94
|
size = 'middle',
|
@@ -103,7 +100,7 @@ export function renderCustom<%= o.functionSegment %>Select({
|
|
103
100
|
defaultValue: null,
|
104
101
|
separator,
|
105
102
|
size,
|
106
|
-
list: refit<%= o.functionSegment %>List({
|
103
|
+
list: refit<%= o.functionSegment %>List({ withUnlimited: true }),
|
107
104
|
dataConvert: (o, index) => {
|
108
105
|
const { flag, name } = o;
|
109
106
|
|
@@ -116,7 +113,6 @@ export function renderCustom<%= o.functionSegment %>Select({
|
|
116
113
|
}
|
117
114
|
|
118
115
|
export function renderForm<%= o.functionSegment %>Select({
|
119
|
-
metaData = null,
|
120
116
|
helper = null,
|
121
117
|
onChange: onChangeCallback,
|
122
118
|
label = '<%= o.label %>',
|
@@ -131,7 +127,7 @@ export function renderForm<%= o.functionSegment %>Select({
|
|
131
127
|
label: title,
|
132
128
|
name,
|
133
129
|
helper,
|
134
|
-
list: refit<%= o.functionSegment %>List({
|
130
|
+
list: refit<%= o.functionSegment %>List({ withUnlimited: false }),
|
135
131
|
dataConvert: (o, index) => {
|
136
132
|
const { flag, name } = o;
|
137
133
|
|
@@ -145,7 +141,6 @@ export function renderForm<%= o.functionSegment %>Select({
|
|
145
141
|
}
|
146
142
|
|
147
143
|
export function renderCustom<%= o.functionSegment %>Radio({
|
148
|
-
metaData = null,
|
149
144
|
label = '<%= o.label %>',
|
150
145
|
separator = ': ',
|
151
146
|
size = 'middle',
|
@@ -157,7 +152,7 @@ export function renderCustom<%= o.functionSegment %>Radio({
|
|
157
152
|
defaultValue: null,
|
158
153
|
separator,
|
159
154
|
size,
|
160
|
-
list: refit<%= o.functionSegment %>List({
|
155
|
+
list: refit<%= o.functionSegment %>List({ withUnlimited: true }),
|
161
156
|
dataConvert: (o, index) => {
|
162
157
|
const { flag, name } = o;
|
163
158
|
|
@@ -170,7 +165,6 @@ export function renderCustom<%= o.functionSegment %>Radio({
|
|
170
165
|
}
|
171
166
|
|
172
167
|
export function renderForm<%= o.functionSegment %>Radio({
|
173
|
-
metaData = null,
|
174
168
|
helper = null,
|
175
169
|
onChange: onChangeCallback,
|
176
170
|
label = '<%= o.label %>',
|
@@ -185,7 +179,7 @@ export function renderForm<%= o.functionSegment %>Radio({
|
|
185
179
|
label: title,
|
186
180
|
name,
|
187
181
|
helper,
|
188
|
-
list: refit<%= o.functionSegment %>List({
|
182
|
+
list: refit<%= o.functionSegment %>List({ withUnlimited: false }),
|
189
183
|
dataConvert: (o, index) => {
|
190
184
|
const { flag, name } = o;
|
191
185
|
|