罗世杰:fix:修改样式
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view
|
||||
class="title-view"
|
||||
v-for="item in title"
|
||||
>
|
||||
<text>{{item}}</text>
|
||||
<view class="arrow">
|
||||
<u-image src="/static/dropdown/dp_icon_lxia.png" width="14rpx" height="11rpx"/>
|
||||
<view class="tabs">
|
||||
<view
|
||||
class="title-view"
|
||||
v-for="(item, index) in title"
|
||||
@click="changeActiveIndex(index)"
|
||||
:class="{isActive: activeIndex === index}"
|
||||
>
|
||||
<text>{{item}}</text>
|
||||
<!-- <text>{{index}}</text> -->
|
||||
<view class="arrow" v-if="activeIndex !== index">
|
||||
<u-image src="/static/dropdown/dp_icon_lxia.png" width="14rpx" height="11rpx"/>
|
||||
</view>
|
||||
<view class="arrow" v-if="activeIndex === index">
|
||||
<u-image src="/static/dropdown/dp_icon_hlxia.png" width="14rpx" height="11rpx"/>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -18,33 +27,48 @@
|
||||
name:"DropDown",
|
||||
data() {
|
||||
return {
|
||||
title: ['行业','区域','面积','筛选']
|
||||
title: ['行业','区域','面积','筛选'],
|
||||
activeIndex: -1
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeActiveIndex(index){
|
||||
if(this.activeIndex === index){
|
||||
this.activeIndex = -1;
|
||||
}
|
||||
this.activeIndex = index
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container{
|
||||
height: 100rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
.title-view {
|
||||
display: flex;
|
||||
>text {
|
||||
font-size: 14px;
|
||||
.isActive{
|
||||
color: #CC3333;
|
||||
}
|
||||
.container{
|
||||
|
||||
.tabs{
|
||||
background-color: #fff;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.title-view {
|
||||
display: flex;
|
||||
>text {
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
.arrow {
|
||||
margin-left: 8rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
.arrow {
|
||||
margin-left: 8rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,8 +1,18 @@
|
||||
<template>
|
||||
<view class="root">
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss" scoped>
|
||||
.root {
|
||||
width: 100%;
|
||||
height: calc(100% - 300rpx);
|
||||
background-color: magenta;
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="list-border">
|
||||
<view class="list-container">
|
||||
<view class="shop-list-img">
|
||||
<view class="list-container" @click="enterDetail()">
|
||||
<view class="shop-list-img" >
|
||||
<u-image width="80px" height="80px" :src="shopInfo.imageUrl" radius="8px"></u-image>
|
||||
</view>
|
||||
<view class="text-area">
|
||||
@@ -87,7 +87,10 @@
|
||||
|
||||
<script>
|
||||
/**
|
||||
* @property shopInfo {Object} 传入商铺对象数据
|
||||
* @property {Object} shopInfo 传入商铺对象数据
|
||||
* @property {Number} showStyle 展示商铺的样式类型(0为首页默认)
|
||||
* @property {Boolean} isADshow 是否显示推广广告
|
||||
* @property {Boolean} isEdit 是否显示编辑和删除
|
||||
*/
|
||||
export default {
|
||||
props: {
|
||||
@@ -135,6 +138,11 @@
|
||||
},
|
||||
handleDel(shopid) {
|
||||
this.$emit('delItem', shopid)
|
||||
},
|
||||
enterDetail(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/detail/detail'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user