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");
}
});
}
}