Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
mallapp
Commits
7fc2f016
Commit
7fc2f016
authored
Jul 25, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
847dd6cc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
205 additions
and
268 deletions
+205
-268
uni-indexed-list-item.vue
components/uni-indexed-list/uni-indexed-list-item.vue
+34
-11
uni-indexed-list.vue
components/uni-indexed-list/uni-indexed-list.vue
+24
-14
ClassList.vue
pages/Luxury/ClassList.vue
+147
-243
No files found.
components/uni-indexed-list/uni-indexed-list-item.vue
View file @
7fc2f016
...
...
@@ -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
:
14
px
;
font-size
:
30r
px
;
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
>
components/uni-indexed-list/uni-indexed-list.vue
View file @
7fc2f016
...
...
@@ -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
...
...
pages/Luxury/ClassList.vue
View file @
7fc2f016
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment