mirror of https://github.com/requarks/wiki
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.
20 lines
382 B
20 lines
382 B
/* 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
|
|
})
|
|
})
|
|
}
|
|
}
|