Commit 1570e3879227ad458220f11a70ed420eda3518f3
1 parent
cf4d1be5
fix: delete reload
Showing
1 changed file
with
6 additions
and
10 deletions
yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts
| @@ -196,16 +196,12 @@ export const useVxeGrid = <T = any>(config?: UseVxeGridConfig<T>) => { | @@ -196,16 +196,12 @@ export const useVxeGrid = <T = any>(config?: UseVxeGridConfig<T>) => { | ||
| 196 | } | 196 | } |
| 197 | await nextTick() | 197 | await nextTick() |
| 198 | return new Promise(async () => { | 198 | return new Promise(async () => { |
| 199 | - message | ||
| 200 | - .delConfirm() | ||
| 201 | - .then(() => { | ||
| 202 | - config?.deleteApi && config?.deleteApi(ids) | ||
| 203 | - message.success(t('common.delSuccess')) | ||
| 204 | - }) | ||
| 205 | - .finally(async () => { | ||
| 206 | - // 刷新列表 | ||
| 207 | - ref.value.commitProxy('query') | ||
| 208 | - }) | 199 | + message.delConfirm().then(async () => { |
| 200 | + await (config?.deleteApi && config?.deleteApi(ids)) | ||
| 201 | + message.success(t('common.delSuccess')) | ||
| 202 | + // 刷新列表 | ||
| 203 | + ref.value.commitProxy('query') | ||
| 204 | + }) | ||
| 209 | }) | 205 | }) |
| 210 | } | 206 | } |
| 211 | /** | 207 | /** |