main
liudan 2 years ago
parent 85a669d1be
commit 7991c4e3cb
  1. 14
      components/wyb-drop-down/wyb-drop-down.vue
  2. 3
      manifest.json
  3. 22
      pages/index/searchPage.vue
  4. BIN
      static/nodata.png

@ -11,6 +11,7 @@
:style="{ :style="{
zIndex: zIndex, zIndex: zIndex,
backgroundColor: bgColor.header}"> backgroundColor: bgColor.header}">
<view class="headercontainer">
<view <view
class="wyb-drop-down-header-item" class="wyb-drop-down-header-item"
v-for="(item,index) in options" v-for="(item,index) in options"
@ -87,7 +88,7 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view>
</view> </view>
<view <view
@ -236,6 +237,7 @@
methods: { methods: {
searchHandle(){ searchHandle(){
console.log(this.catagoryName,"uuu") console.log(this.catagoryName,"uuu")
this.$emit('getContent',this.catagoryName)
}, },
clickHandle(){ clickHandle(){
this.disabled = false; this.disabled = false;
@ -317,15 +319,19 @@
/* #endif */ /* #endif */
left: 0; left: 0;
right: 0; right: 0;
display: flex; /* display: flex; */
flex-direction: row; flex-direction: row;
background-color: #fff; background-color: #fff;
z-index: 500; z-index: 500;
} }
.headercontainer{
position: relative;
z-index: 500;
background-color: #ffffff;
}
.wyb-drop-down-header-item { .wyb-drop-down-header-item {
border:1px solid blue;
position:relative; position:relative;
flex: 1; flex: 1;
height: 100rpx; height: 100rpx;
@ -439,7 +445,7 @@
.withSearch{ .withSearch{
position:absolute; position:absolute;
z-index:999; z-index:999;
top:110upx; top:20upx;
right:24upx; right:24upx;
width:180upx; width:180upx;
height:70upx; height:70upx;

@ -21,7 +21,8 @@
}, },
/* */ /* */
"modules" : { "modules" : {
"OAuth" : {} "OAuth" : {},
"Camera" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {

@ -32,6 +32,7 @@
drop-icon="line" drop-icon="line"
:options="options" :options="options"
defaultColor="#0076F6" defaultColor="#0076F6"
@getContent="getContent"
> >
<view class="tagList"> <view class="tagList">
<view :class="active==index?'tagItem active':'tagItem'" <view :class="active==index?'tagItem active':'tagItem'"
@ -55,13 +56,19 @@
</view> </view>
</view> </view>
<view :class="noSearch?'nosearchListContent marginTop':'nosearchListContent'"> <view v-if="contentList.length>0" :class="noSearch?'nosearchListContent marginTop':'nosearchListContent'">
<view class="firstItem" v-for="item in contentList" <view class="firstItem" v-for="item in contentList"
:key="item.id" @click="goNextSection(item)"> :key="item.id" @click="goNextSection(item)">
<text>{{item.name}}</text> <text>{{item.name}}</text>
<text>{{item.subName}}</text> <text>{{item.subName}}</text>
</view> </view>
</view> </view>
<view class="nodata" v-if="contentList.length==0">
<image src="../../static/nodata.png" mode="widthFix"></image>
<view class="empty">
暂无数据
</view>
</view>
</view> </view>
</template> </template>
@ -94,6 +101,10 @@ export default{
this.getListData(option.id) this.getListData(option.id)
}, },
methods:{ methods:{
getContent(val){
this.catagoryName = val;
this.getListData(this.catagoryId)
},
searchHandle(){ searchHandle(){
this.getListData(this.catagoryId) this.getListData(this.catagoryId)
}, },
@ -160,7 +171,6 @@ export default{
} }
.searchBox{ .searchBox{
position:relative; position:relative;
border:1px solid red;
} }
.withSearch{ .withSearch{
position:absolute; position:absolute;
@ -223,4 +233,12 @@ export default{
color: #0076F6 !important; color: #0076F6 !important;
} }
} }
.nodata{
margin-top:200rpx;
text-align: center;
image{
width:30%;
height:auto;
}
}
</style> </style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Loading…
Cancel
Save