Vux:Alert組件
import { Alert } from 'vux'
export default {
components: {
Alert
}
}
使用場景Demo
第一步:將組件引用並且註冊到對象中
第二步:綁定事件
第三步:編寫事件代碼(個人Demo中的代碼片段)
showModule() {
if (this.payTips) {
window.location.href = this.payurl;
} else {
this.payTips = true;
AlertModule.show({
title: "請支付對應金額",
content: "如支付與訂單不相符金額會造成支付失敗!緊急情況請聯繫客服",
onShow() {
console.log("Module: I'm showing");
},
onHide() {
console.log("Module: I'm hiding now");
}
});
}
}