赞
踩
const h = this.$createElement const hrender = h('p', null, [ h('div', [ h('div',title), // 传变量 h('div',content), h('div',author), h('div',time), ], null), h('button', { class: '样式', // 点击事件 // on:{ // click:this.doSth(parameters) // 不能传参,否则会自动执行 // } }, "做事情"), ])
this.$notify({
title: '提示',
dangerouslyUseHTMLString: true,
message: hrender,
type: 'warning',
position: 'bottom-right',
duration: 0,
// showClose: false,
onClick: () => {
this.toApproval(approvalQuery)
},
onClose: () => {
console.log(`Notify已关闭,说明异常或已查看`)
}
})
data() {
return {
notifyPromise: Promise.resolve(),
... ...
this.notifyPromise = this.notifyPromise.then(this.$nextTick).then(()=>{ // 禁止重叠
this.$notify({
... ...
})
const instance = this.$notify({
... ...
instance.close()
this.$notify.closeAll()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。