mirror of https://github.com/Requarks/wiki.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
396 B
21 lines
396 B
'use strict'
|
|
|
|
/* global $ */
|
|
|
|
export default {
|
|
name: 'content-view',
|
|
data() {
|
|
return {}
|
|
},
|
|
mounted() {
|
|
let self = this
|
|
$('a.toc-anchor').each((i, elm) => {
|
|
let hashText = $(elm).attr('href').slice(1)
|
|
$(elm).on('click', (ev) => {
|
|
ev.stopImmediatePropagation()
|
|
self.$store.dispatch('anchor/open', hashText)
|
|
return false
|
|
})
|
|
})
|
|
}
|
|
}
|