feat: add anchor link for all headings
This commit is contained in:
4
plugins/global.js
Normal file
4
plugins/global.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import Vue from 'vue'
|
||||
import { IconLinkAlt } from 'dls-icons-vue'
|
||||
|
||||
Vue.component('icon-link', IconLinkAlt)
|
@@ -29,6 +29,8 @@ export default ({ app }) => {
|
||||
target = anchor.closest('tr')
|
||||
} else if (app.router.currentRoute.name === 'changelog' && anchor.tagName === 'H2') {
|
||||
target = anchor.closest('.version-item')
|
||||
} else if (['H1', 'H2', 'H3', 'H4', 'H5', 'H6'].includes(anchor.tagName)) {
|
||||
target = anchor
|
||||
}
|
||||
|
||||
if (target) {
|
||||
|
Reference in New Issue
Block a user