Commit 7fc2f016 authored by zhengke's avatar zhengke

no message

parent 847dd6cc
...@@ -3,19 +3,20 @@ ...@@ -3,19 +3,20 @@
<view v-if="loaded || list.itemIndex < 15" class="uni-indexed-list__title-wrapper"> <view v-if="loaded || list.itemIndex < 15" class="uni-indexed-list__title-wrapper">
<text v-if="list.items && list.items.length > 0" class="uni-indexed-list__title">{{ list.key=='*'? '热门品牌': list.key }}</text> <text v-if="list.items && list.items.length > 0" class="uni-indexed-list__title">{{ list.key=='*'? '热门品牌': list.key }}</text>
</view> </view>
<view v-if="(loaded || list.itemIndex < 15) && list.items && list.items.length > 0" class="uni-indexed-list__list"> <view v-if="(loaded || list.itemIndex < 15) && list.items && list.items.length > 0"
:class="{'uni-indexed-list__list':list.key!='*'}">
<view v-if="list.key=='*'" class="imgList"> <view v-if="list.key=='*'" class="imgList">
<view v-for="(item,index) in list.items" :key="index" @click="onClick(idx, index)"> <view v-for="(item,index) in list.items" :key="index" @click="onClick(idx, index)">
{{ item.name }} <image :src="item.img" mode="scaleToFill"/>
<!-- <image src="" /> -->
</view> </view>
</view> </view>
<template v-else> <template v-else>
<view v-for="(item, index) in list.items" :key="index" class="uni-indexed-list__item" hover-class="uni-indexed-list__item--hover"> <view v-for="(item, index) in list.items" :key="index" class="uni-indexed-list__item" hover-class="uni-indexed-list__item--hover">
<view class="uni-indexed-list__item-container" @click="onClick(idx, index)"> <view class="uni-indexed-list__item-container" @click="onClick(idx, index)">
<view class="uni-indexed-list__item-border" :class="{'uni-indexed-list__item-border--last':index===list.items.length-1}"> <view class="uni-indexed-list__item-border" :class="{'uni-indexed-list__item-border--last':index===list.items.length-1}">
<view style="margin-right: 20rpx;"> <view class="imgs" style="margin-right: 20rpx;">
<!-- <image src="" /> --> <!-- mode="aspectFill" -->
<image :src="item.img" mode="scaleToFill"/>
</view> </view>
<text class="uni-indexed-list__item-content">{{ item.name }}</text> <text class="uni-indexed-list__item-content">{{ item.name }}</text>
</view> </view>
...@@ -68,7 +69,7 @@ ...@@ -68,7 +69,7 @@
display: flex; display: flex;
/* #endif */ /* #endif */
flex-direction: column; flex-direction: column;
border-top-style: solid; /* border-top-style: solid; */
border-top-width: 1px; border-top-width: 1px;
border-top-color: #DEDEDE; border-top-color: #DEDEDE;
} }
...@@ -82,6 +83,7 @@ ...@@ -82,6 +83,7 @@
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0 20rpx;
} }
.uni-indexed-list__item-container { .uni-indexed-list__item-container {
...@@ -113,7 +115,7 @@ ...@@ -113,7 +115,7 @@
height: 50px; height: 50px;
padding: 25px; padding: 25px;
padding-left: 0; padding-left: 0;
border-bottom-style: solid; /* border-bottom-style: solid; */
border-bottom-width: 1px; border-bottom-width: 1px;
border-bottom-color: #DEDEDE; border-bottom-color: #DEDEDE;
...@@ -125,8 +127,11 @@ ...@@ -125,8 +127,11 @@
.uni-indexed-list__item-content { .uni-indexed-list__item-content {
flex: 1; flex: 1;
font-size: 14px; font-size: 30rpx;
color: #191919; color: #191919;
font-weight:600;
font-family: -webkit-pictograph;
margin-left: 20rpx;
} }
.uni-indexed-list { .uni-indexed-list {
...@@ -139,9 +144,9 @@ ...@@ -139,9 +144,9 @@
.uni-indexed-list__title-wrapper { .uni-indexed-list__title-wrapper {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
width: 100%;
/* #endif */ /* #endif */
background-color: #f7f7f7; background-color: #f7f7f7;
padding: 0 0 0 20rpx;
} }
.uni-indexed-list__title { .uni-indexed-list__title {
...@@ -154,12 +159,30 @@ ...@@ -154,12 +159,30 @@
.imgList{ .imgList{
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.imgList view{ .imgList view{
flex-shrink: 0; flex-shrink: 0;
width: 33.33%; width: 33.33%;
text-align: center; text-align: center;
height: 60rpx; padding: 20rpx 0 0 0;
line-height: 60rpx; }
.imgList view image{
width: 200rpx;
height: 150rpx;
margin-right: 10rpx;
margin-left: 10rpx;
border-radius: 15rpx;
}
/* .imgList view:nth-child(3n) image{
margin-right: 0;
} */
.imgs{
height: 90rpx;
}
.imgs image{
width: 80rpx;
height: 80rpx;
border-radius: 50%;
} }
</style> </style>
...@@ -6,16 +6,25 @@ ...@@ -6,16 +6,25 @@
<!-- #endif --> <!-- #endif -->
<!-- #ifndef APP-NVUE --> <!-- #ifndef APP-NVUE -->
<scroll-view :scroll-into-view="scrollViewId" class="uni-indexed-list__scroll" scroll-y> <scroll-view :scroll-into-view="scrollViewId" class="uni-indexed-list__scroll" scroll-y>
<view class="right-img"> <!-- <view class="right-img">
<image :src="Image" style="width: 100%; height: 100%;" mode="aspectFill"/> <image :src="classObj.Image" style="width: 100%; height: 100%;" mode="aspectFill"/>
</view> </view> -->
<view v-for="(list, idx) in lists" :key="idx" :id="'uni-indexed-list-' + idx"> <template v-if="lists.length>0">
<view v-for="(list, idx) in lists" :key="idx" :id="'uni-indexed-list-' + idx">
<!-- #endif -->
<!-- #endif -->
<indexed-list-item :list="list" :loaded="loaded" :idx="idx" :showSelect="showSelect" <indexed-list-item :list="list" :loaded="loaded" :idx="idx" :showSelect="showSelect"
@itemClick="onClick"></indexed-list-item> @itemClick="onClick"></indexed-list-item>
<!-- #ifndef APP-NVUE --> <!-- #ifndef APP-NVUE -->
</view>
</template>
<view v-else style="
height: calc(100vh - 50px);
width: calc(100vw - 20px);
padding-top: 0;
">
<u-empty text="没有找到相关品牌信息" font-size="30" mode="list"></u-empty>
</view> </view>
</scroll-view> </scroll-view>
<!-- #endif --> <!-- #endif -->
...@@ -98,10 +107,10 @@ ...@@ -98,10 +107,10 @@
}, },
emits: ['click'], emits: ['click'],
props: { props: {
Image:{ classObj:{
type: String, type: Object,
default: ()=>{ default () {
return "" return {}
} }
}, },
options: { options: {
...@@ -160,7 +169,8 @@ ...@@ -160,7 +169,8 @@
let items = value.data.map(item => { let items = value.data.map(item => {
let obj = {} let obj = {}
obj['key'] = value.letter obj['key'] = value.letter
obj['name'] = item obj['img'] = item.Logo
obj['name'] = item.Name
obj['itemIndex'] = index obj['itemIndex'] = index
index++ index++
obj.checked = item.checked ? item.checked : false obj.checked = item.checked ? item.checked : false
......
This diff is collapsed.
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