fix links title
This commit is contained in:
@@ -60,7 +60,7 @@
|
|||||||
<div class="footnote-child-list" v-if="note.links">
|
<div class="footnote-child-list" v-if="note.links">
|
||||||
<node-view-title
|
<node-view-title
|
||||||
v-for="link in note.links" :key="link.id"
|
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
|
link
|
||||||
@open-node="onFootnoteLinkClick(link, `note-${node.id}-${note.number}`)"
|
@open-node="onFootnoteLinkClick(link, `note-${node.id}-${note.number}`)"
|
||||||
>
|
>
|
||||||
@@ -105,6 +105,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
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 () {
|
addFootnotes () {
|
||||||
const links = this.$el.querySelectorAll('a')
|
const links = this.$el.querySelectorAll('a')
|
||||||
links.forEach((link, i) => {
|
links.forEach((link, i) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user