fix links title

This commit is contained in:
axolotle
2022-03-07 15:25:30 +01:00
parent e784d75105
commit 5840bda7cc
+7 -1
View File
@@ -60,7 +60,7 @@
<div class="footnote-child-list" v-if="note.links">
<node-view-title
v-for="link in note.links" :key="link.id"
:node="link.type === 'prod' && link.parents && link.parents.length ? link.parents[0] : link"
:node="getLinkObj(link)"
link
@open-node="onFootnoteLinkClick(link, `note-${node.id}-${note.number}`)"
>
@@ -105,6 +105,12 @@ export default {
},
methods: {
getLinkObj (link) {
if (link.preTitle || link.italTitle) return link
if (link.type === 'prod' && link.parents && link.parents.length) return link.parents[0]
return link
},
addFootnotes () {
const links = this.$el.querySelectorAll('a')
links.forEach((link, i) => {