优化代码生成模板

This commit is contained in:
不做码农 2023-04-15 18:03:30 +08:00
parent f4d5695f6e
commit f603ccdc71

View File

@ -317,7 +317,6 @@ $end
<el-button type="primary" @click="submitForm">{{ ${t}t('btn.submit') }}</el-button> <el-button type="primary" @click="submitForm">{{ ${t}t('btn.submit') }}</el-button>
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -333,8 +332,6 @@ $end
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
// 选中${replaceDto.FistLowerPk}数组数组 // 选中${replaceDto.FistLowerPk}数组数组
const ids = ref([]) const ids = ref([])
const single = ref(true)
const multiple = ref(true)
const loading = ref(false) const loading = ref(false)
const showSearch = ref(true) const showSearch = ref(true)
const queryParams = reactive({ const queryParams = reactive({
@ -486,11 +483,13 @@ ${end}
/*************** form操作 ***************/ /*************** form操作 ***************/
const formRef = ref() const formRef = ref()
const title = ref("") const title = ref('')
// 操作类型 1、add 2、edit 3、view // 操作类型 1、add 2、edit 3、view
const opertype = ref(0) const opertype = ref(0)
const open = ref(false) const open = ref(false)
const state = reactive({ const state = reactive({
single: true,
multiple: true,
form: {}, form: {},
rules: { rules: {
$foreach(column in genTable.Columns) $foreach(column in genTable.Columns)
@ -510,7 +509,7 @@ $end
} }
}) })
const { form, rules, options } = toRefs(state) const { form, rules, options, single, multiple } = toRefs(state)
// 关闭dialog // 关闭dialog
function cancel(){ function cancel(){