完善代码生成
This commit is contained in:
@@ -29,7 +29,12 @@ const genList = (app, dest) => {
|
|||||||
listProps = "", searchProps = "", btns = "", tableBtns = ""
|
listProps = "", searchProps = "", btns = "", tableBtns = ""
|
||||||
if (checkJson(app.props)) {
|
if (checkJson(app.props)) {
|
||||||
let props = JSON.parse(app.props)
|
let props = JSON.parse(app.props)
|
||||||
listProps = JSON.stringify(props.filter(e => e.isTable))
|
listProps = JSON.stringify(props.filter(e => e.isTable)?.map(e => {
|
||||||
|
delete e.isSearch
|
||||||
|
delete e.isTable
|
||||||
|
delete e.isDetail
|
||||||
|
return e
|
||||||
|
}) || null)?.replace(/"([^"]+)":/g, '$1:')
|
||||||
props.filter(e => e.isSearch && e.dict).map(e => {
|
props.filter(e => e.isSearch && e.dict).map(e => {
|
||||||
searchProps += `<ai-select v-model="search.${e.prop}" placeholder="${e.label}" :selectList="dict.getDict('${e.dict}')"/>`
|
searchProps += `<ai-select v-model="search.${e.prop}" placeholder="${e.label}" :selectList="dict.getDict('${e.dict}')"/>`
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user