平时我们常看见给我们提示取消和确定选择;

今天我们就在vue.js上写一个简单的Dialog列子

引入import { Dialog } from 'vant' 

1.绑定一个事件 例如

<div class="my-content-list" @click="tellUs">           联系我们  </div>

 

2.触发事件 在methods方法里写

tellUs() {                Dialog.confirm({                    title: '确定拔打',                    message: '1314520‘                }).then(() => {                    点击确定按钮时做什么?                }).catch(() => {                    // on cancel                });            },

效果图:

如果你也喜欢vue.欢迎一起讨论,共同进步。

 

 

TAG标签: 小程序小程序before的用法

http://www.xiaochengxub.com/read-101753.html