Commit c97a3492 authored by jyx's avatar jyx

代码优化

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