mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-12 11:25:38 +08:00
✨ 优化部门级联和默认 #I5R3QL
This commit is contained in:
@@ -126,6 +126,12 @@ const { optionsData } = useDictOptions<{
|
||||
}
|
||||
})
|
||||
|
||||
watch(optionsData, (arr) => {
|
||||
if (arr.dept) {
|
||||
formData.pid = arr.dept[0].id
|
||||
}
|
||||
})
|
||||
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
mode.value == 'edit' ? await deptEdit(formData) : await deptAdd(formData)
|
||||
|
||||
Reference in New Issue
Block a user