style:产品物料分类-类型字段默认带入

main
黄伟杰 2 weeks ago
parent 278360f931
commit 09bc7e1305

@ -185,7 +185,9 @@ const resetQuery = () => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
const currentType = queryParams.type ?? (activeTab.value ? Number(activeTab.value) : undefined)
const defaultData = type === 'create' && currentType !== undefined ? { type: currentType } : undefined
formRef.value.open(type, id, defaultData)
}
/** 删除按钮操作 */

Loading…
Cancel
Save