Commit 87f27230823dce393b7380587a230cbc544c0848
1 parent
f41e4d4f
fix: DEFECT-1186 修复任务中心创建或编辑任务无提示消息
Showing
1 changed file
with
5 additions
and
0 deletions
| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | import { FormValueType } from './util'; |
| 12 | 12 | import { unref } from 'vue'; |
| 13 | 13 | import { computed } from 'vue'; |
| 14 | + import { useMessage } from '/@/hooks/web/useMessage'; | |
| 14 | 15 | |
| 15 | 16 | const props = defineProps<{ |
| 16 | 17 | reload: Fn; |
| ... | ... | @@ -49,6 +50,7 @@ |
| 49 | 50 | }); |
| 50 | 51 | |
| 51 | 52 | const loading = ref(false); |
| 53 | + const { createMessage } = useMessage(); | |
| 52 | 54 | const handleOk = async () => { |
| 53 | 55 | try { |
| 54 | 56 | loading.value = true; |
| ... | ... | @@ -58,6 +60,9 @@ |
| 58 | 60 | formMode.value === DataActionModeEnum.CREATE |
| 59 | 61 | ? await createTask(_res) |
| 60 | 62 | : await updateTask({ ..._res, id: unref(dataSource)?.id as string }); |
| 63 | + createMessage.success( | |
| 64 | + unref(modalMode) === DataActionModeEnum.CREATE ? '创建成功' : '修改成功' | |
| 65 | + ); | |
| 61 | 66 | closeModal(); |
| 62 | 67 | props.reload?.(); |
| 63 | 68 | } catch (error) { | ... | ... |