Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
78f973bc
Commit
78f973bc
authored
Nov 17, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片画廊设置左右间距减掉
parent
4565b069
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
static/nativeComponents/PhotoGallery/index.js
+7
-5
static/nativeComponents/PhotoGallery/index.wxss
+1
-1
No files found.
static/nativeComponents/PhotoGallery/index.js
View file @
78f973bc
...
...
@@ -42,7 +42,7 @@ Component({
getPaddingList
:
this
.
data
.
datas
.
componentData
.
paddingList
})
}
console
.
log
(
this
.
data
.
getPaddingList
[
2
],
this
.
data
.
getPaddingList
[
3
],
'--------------------45'
)
if
(
this
.
data
.
datas
.
componentData
.
style
==
'waterfall'
){
console
.
log
(
this
.
data
.
datas
.
componentData
,
'图片画廊waterfall'
)
let
list
=
this
.
data
.
datas
.
componentData
.
imgList
...
...
@@ -117,15 +117,17 @@ Component({
const
res
=
wx
.
getSystemInfoSync
()
let
b
=
countWidth
/
res
.
windowWidth
let
getPaddingListLeft
=
this
.
data
.
getPaddingList
[
2
].
value
;
let
getPaddingListRight
=
this
.
data
.
getPaddingList
[
3
].
value
;
console
.
log
(
getPaddingListLeft
,
getPaddingListRight
,
'---getPaddingListRight'
)
let
b
=
countWidth
/
(
res
.
windowWidth
-
getPaddingListLeft
-
getPaddingListRight
)
console
.
log
(
b
,
'nnnnn'
)
this
.
data
.
imgArr
.
forEach
((
it
,
ii
)
=>
{
this
.
setData
({
[
'imgArr['
+
ii
+
'].width'
]:
it
.
width
/
b
,
[
'imgArr['
+
ii
+
'].height'
]:
it
.
height
/
b
[
'imgArr['
+
ii
+
'].width'
]:
Math
.
ceil
(
it
.
width
/
b
)
,
[
'imgArr['
+
ii
+
'].height'
]:
Math
.
ceil
(
it
.
height
/
b
)
})
})
}
...
...
static/nativeComponents/PhotoGallery/index.wxss
View file @
78f973bc
...
...
@@ -28,7 +28,7 @@
}
.ul .li{
display: inline-block;
flex: 1;
/* flex: 1; */
}
.isTiled{
overflow: hidden;
...
...
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