Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
Overview
Overview
Details
Activity
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
hooloo
mp
user
Commits
8e952b12
Commit
8e952b12
authored
Jun 30, 2022
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复最后一个商品高度问题
parent
b27d77b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
components/menuAssembly/index.vue
+18
-4
No files found.
components/menuAssembly/index.vue
View file @
8e952b12
...
...
@@ -9,7 +9,7 @@
</scroll-view>
<scroll-view
class=
"nav-right"
:style=
"[heightStyle]"
:class=
"[shopCarFlag?'shopCarcss':'' ]"
scroll-y
:scroll-top=
"scrollTop"
@
scroll=
"scroll"
@
touchstart=
"openScroll"
scroll-with-animation
>
<view
v-for=
"
category in classifyData"
:id=
"category.id"
:key=
"category.id"
class=
"box
"
>
<view
v-for=
"
(category,index) in classifyData"
:id=
"category.id"
:key=
"category.id"
class=
"box"
:style=
"[goodBottom]
"
>
<view
:style=
"loads"
class=
"right-title"
>
{{
category
.
name
}}
</view>
<view
class=
"nav-right-item"
v-for=
"item in category.goods"
:key=
"item.goodsId"
>
<view
class=
"thumbnailBox"
>
...
...
@@ -55,6 +55,9 @@ export default {
heightStyle
:
{
'--scroll-height'
:
0
},
goodBottom
:
{
'--good-bottom'
:
0
},
Utils
,
categoryId
:
''
,
categoryPostion
:
[],
...
...
@@ -63,7 +66,8 @@ export default {
scrolled
:
true
,
goods
:[],
shopCarFlag
:
false
,
taBarHeight
:
0
taBarHeight
:
0
,
lastNumber
:
0
}
},
watch
:{
...
...
@@ -80,7 +84,13 @@ export default {
},
computed
:{
classifyData
(){
const
categorys
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
$store
.
state
.
menu
.
setMenuCategorys
))
let
categorys
=
this
.
$store
.
state
.
menu
.
setMenuCategorys
.
length
!=
0
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
$store
.
state
.
menu
.
setMenuCategorys
)):[]
// if(categorys.length!=0){
// const lastGood = 1
// this.lastNumber = lastGood
<=
2
?
3
-
lastGood
:
0
// this.goodBottom['--good-bottom'] = ((this.lastNumber*50))+'px'
// console.log(this.lastNumber)
// }
// 删除没有商品的分类
if
(
categorys
)
{
for
(
var
i
=
categorys
.
length
-
1
;
i
>=
0
;
i
--
)
{
...
...
@@ -93,6 +103,8 @@ export default {
this
.
categoryId
=
categorys
[
0
].
id
;
}
}
this
.
$nextTick
(()
=>
{
const
query
=
uni
.
createSelectorQuery
().
in
(
this
);
query
.
selectAll
(
'.box'
).
boundingClientRect
(
data
=>
{
...
...
@@ -409,8 +421,10 @@ export default {
}
.box
:last-child
{
padding-bottom
:
255
rpx
;
//
padding-bottom
:
var
(
--good-bottom
);
padding-bottom
:
200
rpx
;
//
height
:
100%
;
}
.nav-right-item
image
{
...
...
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