0
我使用这个库VUE-通知:https://github.com/cristijora/vue-notifyjsVue的组件没有渲染
上述页面状态的文档:component: { //is rendered instead of notification message
因此我想给它动力组件,这样我可以处理自定义事件。这是我的代码:
Vue.use(vueNotifyjs)
new Vue({
el: '#app',
methods: {
addNotification(verticalAlign = 'top', horizontalAlign = 'right') {
this.$notify({
component: function(){
return {
template: '<h1>Hello</h1>'
};
},
horizontalAlign: horizontalAlign,
verticalAlign: verticalAlign,
type: "success"
})
}
}
})
这是我的jsfiddle:https://jsfiddle.net/z11fe07p/2706/
但这个词Hello
未在通知得到呈现。任何想法我错过了什么?
好bhai。谢谢。 –