fix(system): 修复新增菜单未选择父菜单时的提交问题- 在提交菜单表单时,如果未选择父菜单,将 parent 字段设置为 null

-确保在更新或添加菜单时,父菜单字段的值是正确的
This commit is contained in:
1638245306
2025-06-19 22:54:14 +08:00
parent 0005d45d85
commit b89f1671c3

View File

@@ -254,6 +254,9 @@ const handleSubmit = () => {
let res;
menuBtnLoading.value = true;
if (menuFormData.id) {
if (menuFormData.parent == undefined) {
menuFormData.parent = null
}
res = await UpdateObj(menuFormData);
} else {
res = await AddObj(menuFormData);