0👍
You have 2 bugs here: 1) showBoxConfirm
doesn’t run a return statement, so it just returns undefined
which is falsy, and 2) clickMethod
doesn’t know to wait for a response and simply continues immediately after showBoxConfirm
returns.
#1 is fixed simply by adding return
to the start of your this.$bvModal
line – this will return the Promise returned by the catch
method. (You could also drop the then
and catch
calls and just return the Promise returned by msgBoxConfirm
.)
To fix #2, I’d make clickMethod
an async function and await
on the Promise returned by showBoxConfirm
. You could also call the Promise’s then
method to register a function to call when it resolves.
- [Vuejs]-Select row in q-table with button using Vue.js
- [Vuejs]-How can I use vue-virtual-scroller with vueuse useInfiniteScroll?
Source:stackexchange.com