feat: 项目管理列表搜索、新增/编辑
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
import { updateRole, createRole } from '@/api/setting';
|
||||
import { RoleFormParam, RoleItem } from '@/types/setting';
|
||||
|
||||
const isLoading = ref<boolean>(false);
|
||||
const props = defineProps<{
|
||||
visible: boolean;
|
||||
isEdit: boolean;
|
||||
@@ -92,7 +93,9 @@
|
||||
{ immediate: true }
|
||||
);
|
||||
const handleOk = async () => {
|
||||
if (isLoading.value) return;
|
||||
try {
|
||||
isLoading.value = true;
|
||||
const valid = await formRef.value.validate();
|
||||
if (valid) return;
|
||||
const params = { ...form };
|
||||
@@ -106,6 +109,8 @@
|
||||
}
|
||||
} catch (err) {
|
||||
// 捕获异常,暂不处理
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user