Vue.prototype.offlineTip = function (obj, fn) {
const h = this.$createElement;
const e1 = h('div', `名称:${obj.name}`)
const e2 = h('div', `时间:${obj.time}`)
return this.$notify({
title: '设备故障',
message: h('div', { style: "color:red;letter-spacing:2px;font-size:16px" }, [e1, e2]),
position: 'bottom-right',
type: 'warning',
duration: 0,
onClick() {
fn(obj)
},
onClose() {
}
});
};
const h = this.$createElement;
const checkbox = h('input', {
attrs: {
type: 'checkbox',
checked: this.checked
},
domProps: {
checked: this.checked
},
on: {
change: (event) => {
}
}
})
const label = h('label', {
style: {
margin: "10% 0 0 0 ",
}
}, [
checkbox,
`不再弹出该类型消息`
])
const button = h('el-button', {
props: {
type: 'primary',
size: "mini"
},
on: {
click: () => {
}
},
style: {
border: "none",
textAlign: "center",
margin: "5% 0 0 0 ",
}
}, '确定')
const br = h('br')
const tip = this.$notify({
type: this.warnType,
title: this.warn.msg,
dangerouslyUseHTMLString: true,
offset: 50,
message: h('div', {
style: {
width: "100%"
},
}, [
label,
br,
button
]),
duration: 0,
customClass: `warnNotify`,
showClose: false,
});
tip.close()