Browse Source

我的种植 添加搜索功能

master
邓宏 2 years ago
parent
commit
9faa6169fa
  1. 14
      pages/massif/myPlant.vue

14
pages/massif/myPlant.vue

@ -2,8 +2,14 @@
.container{ .container{
height:100%; height:100%;
background:#f6f6f6; background:#f6f6f6;
display:flex;
flex-direction: column;
&>.d-search{
margin-bottom:-30rpx;
}
scroll-view{ scroll-view{
height:100%; flex-grow: 1;
height:1rpx;
.items{ .items{
padding:30rpx 30rpx 0; padding:30rpx 30rpx 0;
&+.items{ &+.items{
@ -126,6 +132,7 @@
</style> </style>
<template> <template>
<view class="container"> <view class="container">
<d-search v-model="searchVal.search" @search="clean();search()"/>
<scroll-view scroll-y @scrolltolower="search"> <scroll-view scroll-y @scrolltolower="search">
<view class="items" v-for="(v,k) in list" :key="k"> <view class="items" v-for="(v,k) in list" :key="k">
<view class="card"> <view class="card">
@ -158,7 +165,9 @@
</template> </template>
<script> <script>
import request,{host} from '@/common/request.js' import request,{host} from '@/common/request.js'
import dSearch from '../../uni_modules/d-search/components/d-search/d-search.vue'
export default { export default {
components: { dSearch },
data(){ data(){
return{ return{
host:host('imgUrl'), host:host('imgUrl'),
@ -166,7 +175,8 @@ export default {
total:0, total:0,
searchVal:{ searchVal:{
pageNo:1, pageNo:1,
pageSize:6 pageSize:6,
search:"",
}, },
} }
}, },

Loading…
Cancel
Save