Showing
1 changed file
with
4 additions
and
2 deletions
@@ -132,10 +132,10 @@ | @@ -132,10 +132,10 @@ | ||
132 | const getTitle = computed(() => (!unref(isUpdate) ? '新增角色' : '编辑角色')); | 132 | const getTitle = computed(() => (!unref(isUpdate) ? '新增角色' : '编辑角色')); |
133 | 133 | ||
134 | async function handleSubmit() { | 134 | async function handleSubmit() { |
135 | + setDrawerProps({ confirmLoading: true }); | ||
135 | const { createMessage } = useMessage(); | 136 | const { createMessage } = useMessage(); |
136 | try { | 137 | try { |
137 | const values = await validate(); | 138 | const values = await validate(); |
138 | - setDrawerProps({ confirmLoading: true }); | ||
139 | const req = { | 139 | const req = { |
140 | id: roleId.value, | 140 | id: roleId.value, |
141 | name: values.name, | 141 | name: values.name, |
@@ -150,7 +150,9 @@ | @@ -150,7 +150,9 @@ | ||
150 | createMessage.success(`${unref(isUpdate) ? '编辑' : '新增'}成功`); | 150 | createMessage.success(`${unref(isUpdate) ? '编辑' : '新增'}成功`); |
151 | }); | 151 | }); |
152 | } finally { | 152 | } finally { |
153 | - setDrawerProps({ confirmLoading: false }); | 153 | + setTimeout(() => { |
154 | + setModalProps({ confirmLoading: false }); | ||
155 | + }, 300); | ||
154 | } | 156 | } |
155 | } | 157 | } |
156 | // Tree check事件 | 158 | // Tree check事件 |