open (data) {
this.$notify({
title: 'HTML 片段',
dangerouslyUseHTMLString: true,
message: <notification-popup></notification-popup>
})
}
notification-popup 是我定义的一个内容组件,如何把 data 传入组件中? 直接 <notification-popup :data="data"></notification-popup> 并不可以...
###支持jsx的话可以用
this.$notify({
title: 'HTML 片段',
message: <notification-popup></notification-popup>
})
纯js的话用
this.$notify({
title: 'HTML 片段',
message: this.$createElement('notification-popup')
})