Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
quantum-blocks
Commits
a58c0053
Commit
a58c0053
authored
Jun 23, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 定位问题修复
parent
861e9654
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
index.vue
...omponent/OperationPanel/component/PageBottomTip/index.vue
+8
-1
index.ts
app/web/page/editor/component/OperationPanel/index.ts
+7
-6
No files found.
app/web/page/editor/component/OperationPanel/component/PageBottomTip/index.vue
View file @
a58c0053
<
template
>
<
template
>
<div
class=
"Pb-container"
>
<div
class=
"Pb-container"
:style=
"bgColor"
>
<span
class=
"Pb-text"
:style=
"style"
>
{{
txt
}}
</span>
<span
class=
"Pb-text"
:style=
"style"
>
{{
txt
}}
</span>
</div>
</div>
</
template
>
</
template
>
...
@@ -16,6 +16,12 @@ export default {
...
@@ -16,6 +16,12 @@ export default {
return
{
return
{
color
:
this
.
pageData
.
props
.
pageBottomColor
color
:
this
.
pageData
.
props
.
pageBottomColor
};
};
},
// TODO 这样不太好
bgColor
()
{
return
{
'
backgroundColor
'
:
this
.
pageData
.
commonStyle
.
backgroundColor
};
}
}
}
}
}
}
...
@@ -24,6 +30,7 @@ export default {
...
@@ -24,6 +30,7 @@ export default {
.Pb {
.Pb {
&-container {
&-container {
height: 60px;
height: 60px;
width: 100%;
text-align: center;
text-align: center;
display: flex;
display: flex;
align-items: center;
align-items: center;
...
...
app/web/page/editor/component/OperationPanel/index.ts
View file @
a58c0053
...
@@ -14,7 +14,7 @@ export default class OperationPanel extends Mixins(TransformStyleMixin) {
...
@@ -14,7 +14,7 @@ export default class OperationPanel extends Mixins(TransformStyleMixin) {
@
Prop
(
Boolean
)
isDraging
;
@
Prop
(
Boolean
)
isDraging
;
@
Prop
(
Boolean
)
isDragIn
;
@
Prop
(
Boolean
)
isDragIn
;
layout
:
object
=
[];
bottomInfo
:
object
=
{
bottomInfo
:
object
=
{
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
...
@@ -23,10 +23,13 @@ export default class OperationPanel extends Mixins(TransformStyleMixin) {
...
@@ -23,10 +23,13 @@ export default class OperationPanel extends Mixins(TransformStyleMixin) {
i
:
'
page-bottom-top
'
i
:
'
page-bottom-top
'
};
};
@
Watch
(
'
pageData
'
)
get
layout
()
{
return
this
.
pageData
.
elements
.
map
(
v
=>
v
.
point
);
}
@
Watch
(
'
layout
'
)
onLayoutChange
(
val
)
{
onLayoutChange
(
val
)
{
const
layout
=
this
.
pageData
.
elements
.
map
(
v
=>
v
.
point
);
const
lastGridItemPoint
=
val
[
val
.
length
-
1
];
const
lastGridItemPoint
=
layout
[
layout
.
length
-
1
];
if
(
lastGridItemPoint
.
w
)
{
if
(
lastGridItemPoint
.
w
)
{
this
.
bottomInfo
=
{
this
.
bottomInfo
=
{
x
:
0
,
x
:
0
,
...
@@ -38,8 +41,6 @@ export default class OperationPanel extends Mixins(TransformStyleMixin) {
...
@@ -38,8 +41,6 @@ export default class OperationPanel extends Mixins(TransformStyleMixin) {
if
(
lastGridItemPoint
.
w
>
this
.
bottomInfo
.
w
)
{
this
.
bottomInfo
.
w
=
lastGridItemPoint
.
w
;
}
if
(
lastGridItemPoint
.
w
>
this
.
bottomInfo
.
w
)
{
this
.
bottomInfo
.
w
=
lastGridItemPoint
.
w
;
}
this
.
bottomInfo
.
y
=
this
.
bottomInfo
.
y
+
lastGridItemPoint
.
y
+
lastGridItemPoint
.
h
;
this
.
bottomInfo
.
y
=
this
.
bottomInfo
.
y
+
lastGridItemPoint
.
y
+
lastGridItemPoint
.
h
;
}
}
layout
.
push
(
this
.
bottomInfo
);
this
.
layout
=
layout
;
}
}
@
Emit
(
'
update:isDragIn
'
)
@
Emit
(
'
update:isDragIn
'
)
...
...
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