防止字段注释出现换行引发的报错

This commit is contained in:
吕金泽 2022-06-18 22:50:11 +08:00
parent a686452b13
commit 124d451ff7

View File

@ -39,7 +39,7 @@ function gen(groupPath, data){
} }
html += ` html += `
${d.columnName}: { ${d.columnName}: {
label: '${d.columnComment}', label: '${d.columnComment.trim()}',
${d.component}${props} ${d.component}${props}
},` },`
} }
@ -66,7 +66,7 @@ function gen(groupPath, data){
html += ` html += `
{ {
field: '${d.columnName}', field: '${d.columnName}',
label: '${d.columnComment}'${type}${dictType} label: '${d.columnComment.trim()}'${type}${dictType}
},` },`
} }
} }
@ -135,12 +135,12 @@ function gen(groupPath, data){
messagePrefix = '请输入' messagePrefix = '请输入'
} }
rules = `, rules = `,
rules: [{ required: true, message: '${messagePrefix}${d.columnComment}', trigger: 'change' }]` rules: [{ required: true, message: '${messagePrefix}${d.columnComment.trim()}', trigger: 'change' }]`
} }
html += `{ html += `{
span: 12, span: 12,
name: '${d.columnName}', name: '${d.columnName}',
label: '${d.columnComment}', label: '${d.columnComment.trim()}',
${d.component}${props}${rules} ${d.component}${props}${rules}
},` },`
} }