Commit 7fc2f016 authored by zhengke's avatar zhengke

no message

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