2017-06-11 21:55:06 +00:00
|
|
|
/* global $ */
|
|
|
|
|
2017-05-23 04:27:16 +00:00
|
|
|
export default {
|
|
|
|
name: 'content-view',
|
|
|
|
data() {
|
|
|
|
return {}
|
|
|
|
},
|
|
|
|
mounted() {
|
2017-06-10 14:41:15 +00:00
|
|
|
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
|
|
|
|
})
|
|
|
|
})
|
2017-04-01 21:07:01 +00:00
|
|
|
}
|
2017-02-09 01:52:37 +00:00
|
|
|
}
|