@ -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)
}
/** 删除按钮操作 */