Commit e3f5ed2d authored by jyx's avatar jyx

代码优化

parent ebb216d0
<template>
<z-paging style="height: 100%;">
<z-paging>
<c-navi id='navi'></c-navi>
<book-search-box id='search' :searchType='searchType'></book-search-box>
<read-time-count-row id='count' ref='timeCount' @resize='resizeTimeCount'></read-time-count-row>
......@@ -57,6 +57,8 @@
},
methods: {
show() {
this.$refs.timeCount.refresh()
this.initHeight();
// 监听用户变动
watchUserInfoChange((info) => {
......@@ -103,6 +105,7 @@
query.select("#navi").boundingClientRect();
query.select("#search").boundingClientRect();
query.select("#count").boundingClientRect();
query.select("#count").boundingClientRect();
query.exec((res) => {
let result = 0;
res.forEach(item => {
......
<template>
<z-paging style="height: 100%;">
<z-paging>
<c-navi id='navi'></c-navi>
<book-search-box id='search'></book-search-box>
<CategoryBar id='category' :range='categorys' :current='currentIndex' @change='changeCategory'
......@@ -144,7 +144,7 @@
res.forEach(item => {
result = result + item.height;
})
this.listHeight = this.windowHeight - result;
this.listHeight = this.windowHeight - result - (this.windowHeight * 0.1);
})
},
changeCategory(e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment