Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
897ecfed
authored
May 01, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:【商城】店铺装修-广告魔方:多个小块的边距减少 1 倍,视觉效果和 uniapp 更一致
parent
0f435030
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
src/components/DiyEditor/components/mobile/MagicCube/index.vue
+10
-7
No files found.
src/components/DiyEditor/components/mobile/MagicCube/index.vue
View file @
897ecfed
<
template
>
<
template
>
<div
<div
class=
"relative"
class=
"relative"
:style=
"
{ height: `${rowCount * CUBE_SIZE}px`, width: `${4 * CUBE_SIZE}px` }"
:style=
"
{
height: `${rowCount * CUBE_SIZE}px`,
width: `${4 * CUBE_SIZE}px`,
padding: `${property.space}px`
}"
>
>
<div
<div
v-for=
"(item, index) in property.list"
v-for=
"(item, index) in property.list"
:key=
"index"
:key=
"index"
class=
"absolute"
class=
"absolute"
:style=
"
{
:style=
"
{
width: `${item.width * CUBE_SIZE - property.space * 2}px`,
width: `${item.width * CUBE_SIZE - property.space}px`,
height: `${item.height * CUBE_SIZE - property.space * 2}px`,
height: `${item.height * CUBE_SIZE - property.space}px`,
margin: `${property.space}px`,
top: `${item.top * CUBE_SIZE}px`,
top: `${item.top * CUBE_SIZE}px`,
left: `${item.left * CUBE_SIZE}px`
left: `${item.left * CUBE_SIZE}px`
}"
}"
...
@@ -63,10 +66,10 @@ const rowCount = computed(() => {
...
@@ -63,10 +66,10 @@ const rowCount = computed(() => {
let
count
=
0
let
count
=
0
if
(
props
.
property
.
list
.
length
>
0
)
{
if
(
props
.
property
.
list
.
length
>
0
)
{
// 最大行号
// 最大行号
count
=
Math
.
max
(...
props
.
property
.
list
.
map
((
item
)
=>
item
.
bottom
))
count
=
Math
.
max
(...
props
.
property
.
list
.
map
((
item
)
=>
item
.
top
+
item
.
height
))
}
}
//
行号从 0 开始,所以加 1
//
保证至少有一行
return
count
+
1
return
count
==
0
?
1
:
count
})
})
</
script
>
</
script
>
...
...
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