代碼如下
const weiXinUrl = require("../../assets/weixinpay.jpeg");
const aLiUrl = require("../../assets/alipay.jpeg");
this.$alert("<strong><img src="+ weiXinUrl + " width=100px height=100px><img src=" + aLiUrl + " width=100px height=100px></strong>", '請掃描下方二維碼進行支付:', {
dangerouslyUseHTMLString: true
}).then(action => {
this.buyInsurancePrintTicket();
});
使用傳入html片段形式的彈框,先將圖片地址請求下來,再添加到路徑中。
使用element自定義彈框尚未解決style解析問題,有人使用自定義彈框添加圖片成功的請評論留言解決方法,萬分感謝。