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
2f9f4557
Commit
2f9f4557
authored
Dec 02, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
143072d3
a12ad020
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
index.html
public/index.html
+1
-1
index.vue
src/components/customElement/node/index.vue
+1
-0
common.js
src/utils/common.js
+17
-15
No files found.
public/index.html
View file @
2f9f4557
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</noscript>
</noscript>
<script>
<script>
window
.
__data
=
{
window
.
__data
=
{
token
:
"<%= process.env.NODE_ENV === 'development' ? 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Mj
A4NSwibmFtZSI6IuWKs-eQquWzsCIsImFjY291bnQiOiJsYW9xaWZlbmciLCJlbWFpbCI6Imxhb3FpZmVuZ0BkdWliYS5jb20uY24iLCJtb2JpbGUiOiIxMzQ1Njc3NDE1MyIsImRpbmdVc2VySWQiOiI1MDY5MDYyOTIxMjkxMDAxIiwibW9kZWxBdXRob3JpemUiOmZhbHNlLCJsb2dpblRpbWVvdXQiOjc5MTUwLCJnbXRDcmVhdGUiOjE1MzQ0MTIwMTUwMDAsImdtdE1vZGlmaWVkIjoxNTczODgyMDk2MDAwLCJzeXN0ZW1JZFNldCI6WzAsMSwzNCwyMjcsMzYsMzcsMjMxLDIwMywxOSwyMSwyNDYsMjMsMjUsMjQ5LDI3LDMwXSwiaWF0IjoxNTc0NzU4OTk5fQ.tlRIqNZ3t1-5ZjWBuB7sASQuDBQ03gjfv0aDC_Ba_3
k' : '$TOKEN$' %>"
,
token
:
"<%= process.env.NODE_ENV === 'development' ? 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Mj
Q1LCJuYW1lIjoi5byg5pmo6L6wIiwiYWNjb3VudCI6InpjYyIsImVtYWlsIjoiemNjQGR1aWJhLmNvbS5jbiIsIm1vYmlsZSI6IjE4NzU3MTU1NzUxIiwiZGluZ1VzZXJJZCI6IjAyMDcxMTUyNjgyNDI1MTc1MiIsIm1vZGVsQXV0aG9yaXplIjpmYWxzZSwibG9naW5UaW1lb3V0Ijo4NjMxMCwiZ210Q3JlYXRlIjoxNTM0NDEyMDA4MDAwLCJnbXRNb2RpZmllZCI6MTU3NDA0OTAwODAwMCwic3lzdGVtSWRTZXQiOlswLDEsMzQsMzYsMzcsMjMxLDIwMywxOSwyMSwyNDYsMjMsMjQ5LDI1LDI3LDMwXSwiaWF0IjoxNTc0ODU5OTA5fQ.OIOZDSSdJRPHeDI_YPY6lBFWvNoRZZ2O4uByG6rDOx
k' : '$TOKEN$' %>"
,
apiHost
:
"<%= process.env.NODE_ENV === 'development' ? 'http://beacon.duibadev.com.cn' : '$API_HOST$' %>"
apiHost
:
"<%= process.env.NODE_ENV === 'development' ? 'http://beacon.duibadev.com.cn' : '$API_HOST$' %>"
}
}
</script>
</script>
...
...
src/components/customElement/node/index.vue
View file @
2f9f4557
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
margin
:
0
;
margin
:
0
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
line-height
:
1
;
}
}
}
}
</
style
>
</
style
>
...
...
src/utils/common.js
View file @
2f9f4557
...
@@ -66,7 +66,7 @@ const attrShortMapper = {
...
@@ -66,7 +66,7 @@ const attrShortMapper = {
// 编辑时想拖拽组件需要生成的css属性
// 编辑时想拖拽组件需要生成的css属性
// 只需要位置,不需要来源透明度等等
// 只需要位置,不需要来源透明度等等
const
operatProps
=
[
'x'
,
'y'
,
'left'
,
'top'
,
'right'
,
'bottom'
,
'width'
,
'height'
,
'rotation'
];
const
operatProps
=
[
'x'
,
'y'
,
'left'
,
'top'
,
'right'
,
'bottom'
,
'width'
,
'height'
,
'rotation'
,
'scaleX'
,
'scaleY'
];
const
ignoreProps
=
[
'left'
,
'right'
,
'top'
,
'bottom'
];
const
ignoreProps
=
[
'left'
,
'right'
,
'top'
,
'bottom'
];
// 属性单位 对照表, 如果是数值的时候需要添加单位
// 属性单位 对照表, 如果是数值的时候需要添加单位
...
@@ -207,10 +207,10 @@ export const styles = {
...
@@ -207,10 +207,10 @@ export const styles = {
return
[
'transform'
,
[
`rotate(
${
value
}
deg)`
]];
//`transform: rotate(${value}deg);`;
return
[
'transform'
,
[
`rotate(
${
value
}
deg)`
]];
//`transform: rotate(${value}deg);`;
case
'background-image'
:
case
'background-image'
:
return
[
'background-image'
,
[
`url(
${
value
}
)`
]];
//`background-image: url(${value});background-position:center;background-size:contain;`;
return
[
'background-image'
,
[
`url(
${
value
}
)`
]];
//`background-image: url(${value});background-position:center;background-size:contain;`;
//
case 'scale-x':
case
'scale-x'
:
//
return ['transform', [`scaleX(${value})`]]; //`transform: scaleX(${value});`;
return
[
'transform'
,
[
`scaleX(
${
value
}
)`
]];
//`transform: scaleX(${value});`;
//
case 'scale-y':
case
'scale-y'
:
//
return ['transform', [`scaleY(${value})`]]; //`transform: scaleY(${value});`;
return
[
'transform'
,
[
`scaleY(
${
value
}
)`
]];
//`transform: scaleY(${value});`;
case
'visible'
:
case
'visible'
:
return
[
'display'
,
[
value
?
'block'
:
'none'
]];
// `display: ${value ? 'block' : 'none'};`;
return
[
'display'
,
[
value
?
'block'
:
'none'
]];
// `display: ${value ? 'block' : 'none'};`;
default
:
default
:
...
@@ -276,14 +276,16 @@ export const styles = {
...
@@ -276,14 +276,16 @@ export const styles = {
// 如果节点的width/height未定义,则设置拖拽组件的width/height为0
// 如果节点的width/height未定义,则设置拖拽组件的width/height为0
cmpSelfProps
.
width
=
cmpSelfProps
.
width
||
0
;
cmpSelfProps
.
width
=
cmpSelfProps
.
width
||
0
;
cmpSelfProps
.
height
=
cmpSelfProps
.
height
||
0
;
cmpSelfProps
.
height
=
cmpSelfProps
.
height
||
0
;
}
if
(
cmpSelfProps
.
scaleX
&&
cmpSelfProps
.
width
)
{
if
(
cmpSelfProps
.
scaleX
&&
cmpSelfProps
.
width
)
{
cmpSelfProps
.
width
*=
cmpSelfProps
.
scaleX
;
cmpSelfProps
.
width
*=
cmpSelfProps
.
scaleX
;
delete
cmpSelfProps
.
scaleX
;
}
}
if
(
cmpSelfProps
.
scaleY
&&
cmpSelfProps
.
height
)
{
if
(
cmpSelfProps
.
scaleY
&&
cmpSelfProps
.
height
)
{
cmpSelfProps
.
height
*=
cmpSelfProps
.
scaleY
;
cmpSelfProps
.
height
*=
cmpSelfProps
.
scaleY
;
delete
cmpSelfProps
.
scaleY
;
}
}
}
// 把不需要参与样式计算的属性干掉
// 把不需要参与样式计算的属性干掉
...
@@ -305,7 +307,7 @@ export const styles = {
...
@@ -305,7 +307,7 @@ export const styles = {
result
+=
'border-style: solid;'
result
+=
'border-style: solid;'
}
}
});
});
result
+=
`background-position: center;background-size: 100% 100%;`
result
+=
`background-position: center;background-size: 100% 100%;
transform-origin: left top;
`
if
(
component
.
type
===
'circle'
&&
!
onlyOpera
)
{
if
(
component
.
type
===
'circle'
&&
!
onlyOpera
)
{
// 如果是circle类型,加圆角
// 如果是circle类型,加圆角
...
...
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