fix links title
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user