Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-editor
Project
Project
Details
Activity
Releases
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
劳工
zeroing-editor
Commits
f0779f86
Commit
f0779f86
authored
Nov 27, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
0fbdd4b4
9fbdf5e6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
13 deletions
+19
-13
project.js
src/store/modules/project.js
+0
-3
common.js
src/utils/common.js
+17
-8
properties.js
src/utils/properties.js
+2
-2
No files found.
src/store/modules/project.js
View file @
f0779f86
...
...
@@ -156,9 +156,6 @@ export const projectStore = {
});
}
console
.
log
(
'newView'
,
newView
);
// curOperate.push(_.cloneDeep(newView)) // 保存操作之后的配置
// 在操作栈中插入最新值
state
.
operateStack
.
unshift
(
_
.
cloneDeep
(
newView
));
// 超过最大保存数就丢弃
...
...
src/utils/common.js
View file @
f0779f86
...
...
@@ -265,14 +265,6 @@ export const styles = {
});
}
if
(
cmpSelfProps
.
scaleX
)
{
cmpSelfProps
.
width
*=
cmpSelfProps
.
scaleX
;
}
if
(
cmpSelfProps
.
scaleY
)
{
cmpSelfProps
.
height
*=
cmpSelfProps
.
scaleY
;
}
// 获取拖拽组件的样式,只生成operatProps中的属性
if
(
onlyOpera
)
{
_
.
forIn
(
cmpSelfProps
,
(
val
,
key
)
=>
{
...
...
@@ -280,6 +272,18 @@ export const styles = {
delete
cmpSelfProps
[
key
];
}
});
// 如果节点的width/height未定义,则设置拖拽组件的width/height为0
cmpSelfProps
.
width
=
cmpSelfProps
.
width
||
0
;
cmpSelfProps
.
height
=
cmpSelfProps
.
height
||
0
;
}
if
(
cmpSelfProps
.
scaleX
&&
cmpSelfProps
.
width
)
{
cmpSelfProps
.
width
*=
cmpSelfProps
.
scaleX
;
}
if
(
cmpSelfProps
.
scaleY
&&
cmpSelfProps
.
height
)
{
cmpSelfProps
.
height
*=
cmpSelfProps
.
scaleY
;
}
// 把不需要参与样式计算的属性干掉
...
...
@@ -308,6 +312,11 @@ export const styles = {
result
+=
'border-radius: 50%;'
}
if
(
component
.
type
===
'label'
&&
!
onlyOpera
)
{
// 如果是label类型,禁止自动换行
result
+=
'word-break: keep-all;'
}
// console.log('getComponentStyle',component.name, result);
return
result
;
}
...
...
src/utils/properties.js
View file @
f0779f86
...
...
@@ -36,12 +36,12 @@ export default {
width
:
{
title
:
'宽度'
,
type
:
'inputNumber'
,
value
:
1
value
:
undefined
},
height
:
{
title
:
'高度'
,
type
:
'inputNumber'
,
value
:
1
value
:
undefined
},
horizonCenter
:
{
title
:
'水平偏移'
,
...
...
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