spelling - fix handling empty tags
This commit is contained in:
parent
789427bdab
commit
73fab096b9
|
@ -7,7 +7,18 @@
|
|||
text: {},
|
||||
},
|
||||
render(h) {
|
||||
return h('span', {domProps: { innerHTML: this.handleSpelling(this.text !== undefined ? this.text : this.$slots.default[0].text) }});
|
||||
return h('span', {domProps: { innerHTML: this.handleSpelling(this.val) }});
|
||||
},
|
||||
computed: {
|
||||
val() {
|
||||
if (this.text !== undefined) {
|
||||
return this.text;
|
||||
}
|
||||
if (this.$slots.default && this.$slots.default.length) {
|
||||
return this.$slots.default[0].text;
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Reference in New Issue