修改目录
parent
947011103c
commit
b69ecca252
|
@ -1,14 +1,14 @@
|
||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
//- div(:class="$style.main")
|
//- div(:class="$style.main")
|
||||||
div.scroll(:class="$style.toc")
|
//- div.scroll(:class="$style.toc")
|
||||||
ul(:class="$style.tocList")
|
//- ul(:class="$style.tocList")
|
||||||
li(:class="$style.tocListItem" v-for="h2 in toc" :key="h2.id")
|
//- li(:class="$style.tocListItem" v-for="h2 in toc.list" :key="h2.id")
|
||||||
h2(:class="$style.tocH2" :tips="h2.title")
|
//- h2(:class="[$style.tocH2, toc.activeId == h2.id ? $style.active : null]" :tips="h2.title")
|
||||||
a(:href="'#' + h2.id") {{h2.title}}
|
//- a(:href="'#' + h2.id" @click="toc.activeId = h2.id") {{h2.title}}
|
||||||
ul(:class="$style.tocList" v-if="h2.children.length")
|
//- ul(:class="$style.tocList" v-if="h2.children.length")
|
||||||
li(:class="$style.tocSubListItem" v-for="h3 in h2.children" :key="h3.id")
|
//- li(:class="$style.tocSubListItem" v-for="h3 in h2.children" :key="h3.id")
|
||||||
h3(:class="$style.tocH3" :tips="h3.title")
|
//- h3(:class="[$style.tocH3, toc.activeId == h3.id ? $style.active : null]" :tips="h3.title")
|
||||||
a(:href="'#' + h3.id") {{h3.title}}
|
//- a(:href="'#' + h3.id" @click="toc.activeId = h3.id") {{h3.title}}
|
||||||
div.scroll(:class="$style.setting" ref="dom_setting")
|
div.scroll(:class="$style.setting" ref="dom_setting")
|
||||||
dl(ref="dom_setting_list")
|
dl(ref="dom_setting_list")
|
||||||
dt#basic {{$t('view.setting.basic')}}
|
dt#basic {{$t('view.setting.basic')}}
|
||||||
|
@ -592,7 +592,10 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
isEditHotKey: false,
|
isEditHotKey: false,
|
||||||
toc: [],
|
toc: {
|
||||||
|
list: [],
|
||||||
|
activeId: '',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -652,7 +655,7 @@ export default {
|
||||||
init() {
|
init() {
|
||||||
this.current_setting = JSON.parse(JSON.stringify(this.setting))
|
this.current_setting = JSON.parse(JSON.stringify(this.setting))
|
||||||
if (!window.currentWindowSizeId) window.currentWindowSizeId = this.setting.windowSizeId
|
if (!window.currentWindowSizeId) window.currentWindowSizeId = this.setting.windowSizeId
|
||||||
// this.initTOC()
|
this.initTOC()
|
||||||
this.getCacheSize()
|
this.getCacheSize()
|
||||||
this.getMediaDevice()
|
this.getMediaDevice()
|
||||||
this.current_hot_key = window.appHotKeyConfig
|
this.current_hot_key = window.appHotKeyConfig
|
||||||
|
@ -684,7 +687,7 @@ export default {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// console.log(toc)
|
// console.log(toc)
|
||||||
// this.toc = toc
|
// this.toc.list = toc
|
||||||
// },
|
// },
|
||||||
// handleListScroll(event) {
|
// handleListScroll(event) {
|
||||||
// // console.log(event.target.scrollTop)
|
// // console.log(event.target.scrollTop)
|
||||||
|
@ -1113,6 +1116,11 @@ export default {
|
||||||
// a {
|
// a {
|
||||||
// color: @color-theme;
|
// color: @color-theme;
|
||||||
// }
|
// }
|
||||||
|
// &.active {
|
||||||
|
// a {
|
||||||
|
// color: @color-theme;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
// }
|
// }
|
||||||
// .tocH3 {
|
// .tocH3 {
|
||||||
// font-size: 13px;
|
// font-size: 13px;
|
||||||
|
|
Loading…
Reference in New Issue