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
605a9e1a
Commit
605a9e1a
authored
Jan 13, 2021
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: dots保存在组件内部
parent
92c63c3c
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
261 additions
and
264 deletions
+261
-264
config.ts
app/web/lib/config.ts
+252
-258
index.ts
app/web/page/activity/view/activity/index.ts
+1
-1
index.ts
app/web/page/editor/component/DynamicForm/index.ts
+3
-0
index.ts
app/web/page/editor/component/FreedomContainer/index.ts
+4
-4
index.vue
app/web/page/editor/component/FreedomContainer/index.vue
+1
-1
No files found.
app/web/lib/config.ts
View file @
605a9e1a
This diff is collapsed.
Click to expand it.
app/web/page/activity/view/activity/index.ts
View file @
605a9e1a
...
@@ -23,7 +23,7 @@ export default class Activity extends Vue {
...
@@ -23,7 +23,7 @@ export default class Activity extends Vue {
@
Watch
(
'
pageName
'
,
{
immediate
:
true
})
@
Watch
(
'
pageName
'
,
{
immediate
:
true
})
onPageNameChange
(
newVal
)
{
onPageNameChange
(
newVal
)
{
if
(
newVal
)
{
if
(
EASY_ENV_IS_BROWSER
&&
newVal
)
{
document
.
title
=
newVal
;
document
.
title
=
newVal
;
// 如果是 iOS 设备,则使用如下 hack 的写法实现页面标题的更新
// 如果是 iOS 设备,则使用如下 hack 的写法实现页面标题的更新
if
(
navigator
.
userAgent
.
match
(
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/
))
{
if
(
navigator
.
userAgent
.
match
(
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/
))
{
...
...
app/web/page/editor/component/DynamicForm/index.ts
View file @
605a9e1a
...
@@ -119,6 +119,9 @@ export default class DynamicForm extends Mixins(ContextMenu) {
...
@@ -119,6 +119,9 @@ export default class DynamicForm extends Mixins(ContextMenu) {
case
'
number
'
:
case
'
number
'
:
result
=
'
Number
'
;
result
=
'
Number
'
;
break
;
break
;
case
'
Upload
'
:
result
=
'
Upload
'
;
break
;
}
}
return
result
;
return
result
;
}
}
...
...
app/web/page/editor/component/FreedomContainer/index.ts
View file @
605a9e1a
...
@@ -16,6 +16,8 @@ export default class FreedomContainer extends Mixins(ContextMenu) {
...
@@ -16,6 +16,8 @@ export default class FreedomContainer extends Mixins(ContextMenu) {
@
Prop
({
type
:
Boolean
,
default
:
false
})
showHeader
;
@
Prop
({
type
:
Boolean
,
default
:
false
})
showHeader
;
@
Prop
(
String
)
backgroundImage
;
@
Prop
(
String
)
backgroundImage
;
dots
:
object
=
{};
mousedown
(
childIndex
,
event
)
{
mousedown
(
childIndex
,
event
)
{
this
.
setDragable
(
false
);
this
.
setDragable
(
false
);
const
childItem
=
cloneDeep
(
this
.
childItem
);
const
childItem
=
cloneDeep
(
this
.
childItem
);
...
@@ -63,7 +65,7 @@ export default class FreedomContainer extends Mixins(ContextMenu) {
...
@@ -63,7 +65,7 @@ export default class FreedomContainer extends Mixins(ContextMenu) {
@
Watch
(
'
curChildIndex
'
)
@
Watch
(
'
curChildIndex
'
)
onIndexChange
(
newVal
)
{
onIndexChange
(
newVal
)
{
this
.
childItem
.
child
.
forEach
(
item
=>
delete
item
.
dots
)
;
this
.
dots
=
{}
;
if
(
newVal
||
newVal
===
0
)
{
if
(
newVal
||
newVal
===
0
)
{
this
.
setPointStyle
();
this
.
setPointStyle
();
}
}
...
@@ -74,14 +76,12 @@ export default class FreedomContainer extends Mixins(ContextMenu) {
...
@@ -74,14 +76,12 @@ export default class FreedomContainer extends Mixins(ContextMenu) {
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
points
=
[
'
lt
'
,
'
rt
'
,
'
lb
'
,
'
rb
'
,
'
l
'
,
'
r
'
,
'
t
'
,
'
b
'
];
const
points
=
[
'
lt
'
,
'
rt
'
,
'
lb
'
,
'
rb
'
,
'
l
'
,
'
r
'
,
'
t
'
,
'
b
'
];
const
[
height
,
width
]
=
this
.
getHW
(
this
.
curChildIndex
);
const
[
height
,
width
]
=
this
.
getHW
(
this
.
curChildIndex
);
const
dots
=
points
.
reduce
((
pre
,
cur
)
=>
{
this
.
dots
[
this
.
curChildIndex
]
=
points
.
reduce
((
pre
,
cur
)
=>
{
pre
[
cur
]
=
convertPointStyle
(
cur
,
{
height
,
width
});
pre
[
cur
]
=
convertPointStyle
(
cur
,
{
height
,
width
});
return
pre
;
return
pre
;
},
{});
},
{});
const
childEle
=
this
.
childItem
.
child
[
this
.
curChildIndex
];
const
childEle
=
this
.
childItem
.
child
[
this
.
curChildIndex
];
// this.updatePageInfo({ containerIndex: this.containerIndex, childIndex: this.curChildIndex, data: { ...childEle, commonStyle: { ...childEle.commonStyle, height: +height, width: +width } } });
this
.
updateCommonStyle
({
containerIndex
:
this
.
containerIndex
,
childIndex
:
this
.
curChildIndex
,
data
:
{
...
childEle
.
commonStyle
,
height
:
+
height
,
width
:
+
width
}});
this
.
updateCommonStyle
({
containerIndex
:
this
.
containerIndex
,
childIndex
:
this
.
curChildIndex
,
data
:
{
...
childEle
.
commonStyle
,
height
:
+
height
,
width
:
+
width
}});
this
.
$set
(
this
.
childItem
.
child
[
this
.
curChildIndex
],
'
dots
'
,
dots
);
});
});
}
}
...
...
app/web/page/editor/component/FreedomContainer/index.vue
View file @
605a9e1a
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
v-for=
"(item, index) in childItem.child"
:style=
"transformStyle(item.commonStyle, 'container')"
:class=
"['freedom-body-item',
{ 'Fb-item_selected': curChildIndex === index }]" :key="index" @click.stop="handleElementClick(containerIndex, index)" @mousedown.stop="mousedown(index, $event)" @contextmenu.prevent.stop="show($event, containerIndex, index)">
<div
v-for=
"(item, index) in childItem.child"
:style=
"transformStyle(item.commonStyle, 'container')"
:class=
"['freedom-body-item',
{ 'Fb-item_selected': curChildIndex === index }]" :key="index" @click.stop="handleElementClick(containerIndex, index)" @mousedown.stop="mousedown(index, $event)" @contextmenu.prevent.stop="show($event, containerIndex, index)">
<component
ref=
"childComponent"
:style=
"transformStyle(item.commonStyle, 'component')"
:is=
"item.name"
v-bind=
"item.props"
></component>
<component
ref=
"childComponent"
:style=
"transformStyle(item.commonStyle, 'component')"
:is=
"item.name"
v-bind=
"item.props"
></component>
<div
class=
"freedom-body-dot"
<div
class=
"freedom-body-dot"
v-for=
"(style, key) in
item.dots
"
v-for=
"(style, key) in
dots[index]
"
:key=
"key"
:key=
"key"
:style=
"style"
:style=
"style"
@
mousedown.stop.prevent=
"handleMouseDownOnPoint(key, $event)"
/>
@
mousedown.stop.prevent=
"handleMouseDownOnPoint(key, $event)"
/>
...
...
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