当您更改 a 中的选定值时,我想显示一个确认操作的模式b-form-selected
。我无法停止事件,它总是在模态显示之前更改值。有这个选项吗?
<b-form-select
id="serviceType"
v-model="serviceTypeSelected"
class="dropdown textfield"
:data-value="serviceTypeSelected"
:value="serviceTypeSelected"
required
@change="changeServiceType">
<option
v-for="option in serviceTypeList"
:key="option.serviceTypeId"
:value="option.serviceTypeId">
{{ option.serviceTypeName }}
</option>
</b-form-select>
function changeServiceType () {
this.$bvModal.msgBoxConfirm('Please confirm that you want to delete everything.', {
title: 'Please Confirm',
size: 'sm',
okTitle: 'YES',
cancelTitle: 'NO',
centered: true
})
.then(value => {
if (value) {
//do things
} else {
//nothing
}
})
.catch(err => {
// An error occurred
})
}