//在页面引入
<van-icon name="delete-o" @click="allDel()"/>
//在main.js文件中
import { Dialog } from 'vant';
Vue.use(Dialog);
//在methods中定义方法
methods: {
allDel(){
this.$dialog.confirm({
// title:'标题奥',
message:'确定要清除全部历史记录吗',
confirmButtonColor:'red'
}).then(()=>{
console.log('点击了确认')
this.del();
}).catch(()=>{
console.log('点击了取消')
})
}
}
vue 调用vant弹窗组件
猜你喜欢
转载自blog.csdn.net/weixin_48188065/article/details/119970861
今日推荐
周排行