Commit c97a3492 authored by jyx's avatar jyx

代码优化

parent eb917ec3
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
.line { .line {
width: 30%; width: 30%;
background-color: lightgray; background-color: #DCBD3B;
height: 1rpx; height: 1rpx;
} }
...@@ -268,7 +268,8 @@ ...@@ -268,7 +268,8 @@
font-size: 26rpx; font-size: 26rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 30rpx; background-color: #DCBD3B;
padding: 30rpx 40rpx;
.warn-p { .warn-p {
margin-bottom: 15rpx; margin-bottom: 15rpx;
......
...@@ -67,8 +67,9 @@ ...@@ -67,8 +67,9 @@
methods: { methods: {
chooseKeyword(e) { chooseKeyword(e) {
this.keyword = e.detail.keyword; this.keyword = e.detail.keyword;
this.result = []; this.result = [];
this.refreshSearchList(); // keyword改变自动执行startSearch
// this.refreshSearchList();
}, },
clearSearch(e) { clearSearch(e) {
this.keyword = ""; this.keyword = "";
......
<template> <template>
<c-list ref="list" flag='search' method="POST" :needLogin="needLogin" :height="height" :url='requestUrl' <c-list ref="list" flag='search' method="POST" :needLogin="needLogin" :height="height" :url='requestUrl'
:param='requestParam' @change='changeData' :showSearchEmpty="true"> :param='requestParam' @change='changeData' :showSearchEmpty="true" :ableLoadMore="false">
<book-list-item v-for='(item, index) in dataList' :key='index' :item='item' :showClose="false" <book-list-item v-for='(item, index) in dataList' :key='index' :item='item' :showClose="false"
@tapItem='tapItem($event, index)'> @tapItem='tapItem($event, index)'>
</book-list-item> </book-list-item>
...@@ -68,10 +68,12 @@ ...@@ -68,10 +68,12 @@
}, },
methods: { methods: {
refreshList() { refreshList() {
let ref = this.$refs.list; setTimeout(() => {
if (ref) { let ref = this.$refs.list;
ref.onPullRefreshing(); if (ref) {
} ref.requestData(1);
}
}, 200)
}, },
changeData(e) { changeData(e) {
this.dataList = e.detail.data.map(item => { this.dataList = e.detail.data.map(item => {
......
...@@ -48,10 +48,10 @@ body { ...@@ -48,10 +48,10 @@ body {
box-sizing: border-box; box-sizing: border-box;
} }
.center { // .center {
text-align: center; // text-align: center;
justify-content: center; // justify-content: center;
} // }
.right { .right {
text-align: right; text-align: right;
......
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