| | |
| | | <div class="page-main" @scroll="throttledScrollHandler"> |
| | | <div |
| | | class="page-content" |
| | | :style="{ |
| | | fontSize: fontSize ? fontSize + 'px' : '16px', |
| | | transform: `scale(${pageZoom ? pageZoom : 1})` |
| | | }" |
| | | > |
| | | <pageHeader v-if="showCatalogList.indexOf(0) > -1"></pageHeader> |
| | | <chapterOne v-if="showCatalogList.indexOf(1) > -1"></chapterOne> |
| | |
| | | observer: null |
| | | }; |
| | | }, |
| | | computed: { |
| | | fontSize() { |
| | | return this.$store.state.qiankun.fontSize; |
| | | }, |
| | | pageZoom() { |
| | | return this.$store.state.qiankun.scale / 100; |
| | | } |
| | | }, |
| | | watch: { |
| | | showCatalogList: { |
| | | handler(newVal, oldVal) { |
| | |
| | | }, |
| | | mounted() { |
| | | // 默认加载章节 |
| | | this.showCatalogList = [3]; |
| | | this.showCatalogList = [0]; |
| | | // 滚动监听节流 |
| | | this.throttledScrollHandler = _.throttle( |
| | | this.scrollFun, |