This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2021-02-01 12:03:30 -08:00
|
|
|
<script>
|
|
|
|
import spelling from "../plugins/spelling";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
mixins: [ spelling ],
|
|
|
|
props: {
|
|
|
|
text: {},
|
|
|
|
},
|
|
|
|
render(h) {
|
2021-02-02 12:56:17 -08:00
|
|
|
return h('span', {domProps: { innerHTML: this.handleSpelling(this.val) }});
|
2021-02-01 12:03:30 -08:00
|
|
|
},
|
2021-02-02 12:56:17 -08:00
|
|
|
computed: {
|
|
|
|
val() {
|
|
|
|
if (this.text !== undefined) {
|
|
|
|
return this.text;
|
|
|
|
}
|
|
|
|
if (this.$slots.default && this.$slots.default.length) {
|
|
|
|
return this.$slots.default[0].text;
|
|
|
|
}
|
|
|
|
return ''
|
|
|
|
}
|
|
|
|
}
|
2021-02-01 12:03:30 -08:00
|
|
|
}
|
|
|
|
</script>
|