File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
web/src/view/systemTools/autoCode Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1207,6 +1207,20 @@ const enterForm = async(isPreview) => {
12071207 return false
12081208 }
12091209 form .value .humpPackageName = toSQLLine (form .value .packageName )
1210+
1211+ form .value .fields .forEach (item => {
1212+ if (item .fieldType === ' enum' ){
1213+ // 判断一下 item.dataTypeLong 按照,切割后的每个元素是否都使用 '' 包裹,如果没包 则修改为包裹起来的 然后再转为字符串赋值给 item.dataTypeLong
1214+ const arr = item .dataTypeLong .split (' ,' )
1215+ arr .forEach ((ele , index ) => {
1216+ if (ele .indexOf (" '" ) === - 1 ){
1217+ arr[index] = ` '${ ele} '`
1218+ }
1219+ })
1220+ item .dataTypeLong = arr .join (' ,' )
1221+ }
1222+ })
1223+
12101224 delete form .value .primaryField
12111225 if (isPreview) {
12121226 const data = await preview (form .value )
You can’t perform that action at this time.
0 commit comments