vue-custom-alert
v1.0.3
Published
vue custom alert
Downloads
6
Readme
适用于vue的弹框
示例
使用示例
<alert v-if="showAlert" text="测试内容" title="测试抬头" cancel="取消" confirm="确认" @closeAlert='closeAlert' @confirm='confirmAlert' @cancel='cancelAlert'></alert>
import alert from 'vue-custom-alert'
export default {
data() {
return {
showAlert: true
};
},
components: {
alert
},
methods: {
closeAlert() {
this.showAlert = false
},
confirmAlert () {
console.log('点击了确定按钮')
this.showAlert = false
},
cancelAlert () {
console.log('点击了取消按钮')
this.showAlert = false
},
}
}