Fix(千县名品):店铺—产业—招商政策—更多政策,少做了搜索框,效果图是有搜索框的

This commit is contained in:
linxi
2024-08-26 17:57:57 +08:00
parent a97835ed27
commit 2bf5ba295e
2 changed files with 68 additions and 4 deletions
+21 -4
View File
@@ -1,8 +1,19 @@
<template>
<view class="list-page">
<view class="v12-mb-3">
<u-search
placeholder="请输入关键词查询"
v-model="keyword"
shape="round"
:show-action="false"
height="72rpx"
@search="handleSearch"
bg-color="#fff">
</u-search>
</view>
<view v-if="isLoad" class="file-list">
<view
v-for="(file, fileIndex) in list"
v-for="(file, fileIndex) in currentList"
:key="fileIndex"
class="file-item"
@click="fileItemClick(file)"
@@ -15,11 +26,11 @@
class="icon"
/>
</view>
<image
<!-- <image
:src="webUrl + '/home/no-data-bg.png'"
mode="widthFix"
class="loadend"
/>
/> -->
</view>
<goo-skeleton v-else />
</view>
@@ -37,7 +48,9 @@ export default {
webUrl: this.$VUE_APP_RESOURCES_URL,
isLoad: false,
pageKeyId: '',
list: []
list: [],
keyword: '',
currentList: []
}
},
onLoad(options) {
@@ -45,6 +58,9 @@ export default {
this.getListReq(id)
},
methods: {
handleSearch() {
this.currentList = this.list.filter(item => item.title.indexOf(this.keyword) > -1)
},
getListReq(id) {
getCountyFamousInvestmentFile({
countyFamousDataId: id,
@@ -55,6 +71,7 @@ export default {
if (success) {
this.isLoad = true
this.list = data.records || []
this.currentList = [...this.list]
}
})
},