Vue BootStrap toast (闪 消失 disappears)

when I click the button to show up toast, it showed once and disappear immediately.


"bootstrap": "^5.1.3",
"bootstrap-vue": "^2.22.0",
"vue": "^2.6.14",
"axios": "^0.27.2",
"vue-axios": "^3.4.1",


import Vue from 'vue';
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue';
Vue.use(BootstrapVue, IconsPlugin);


<b-button @click="main" block variant="outline-primary">Register</b-button>

export default {
data() {
return {};
methods: {
main() {
// 验证数据
this.$bvToast.toast(, {
title: "请求失败",
variant: "danger",
appendToast: true,
autoHideDelay: 3000,

.toast:not(.show) {
display: block;

XRSec has the right to modify and interpret this article. If you want to reprint or disseminate this article, you must ensure the integrity of this article, including all contents such as copyright notice. Without the permission of the author, the content of this article shall not be modified or increased or decreased arbitrarily, and it shall not be used for commercial purposes in any way