interaction between texts and toc, alpha version, still buged

This commit is contained in:
2020-07-13 12:46:47 +02:00
parent d336347fcb
commit 64f38eac6f
9 changed files with 153 additions and 29 deletions
+7 -2
View File
@@ -5,7 +5,9 @@ import Vue from 'vue'
export default {
name: 'EdText',
props: {
tei: String
tei: String,
uuid: String,
textid: String
},
data: () => ({
template: null,
@@ -37,7 +39,10 @@ export default {
this.template.staticRenderFns.map(fn => (this.$options.staticRenderFns.push(fn)))
},
buildHtml () {
this.html = `<div class="tei">${this.tei}</div>`
this.html = `<div` +
` class="tei${this.uuid === this.textid ? ' active' : ''}"` +
` data-uuid="${this.uuid}"` +
`>${this.tei}</div>`
this.parseLinks()
// console.log('EdText: builded html', this.html)
},