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
f8719341
Commit
f8719341
authored
Dec 11, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
0a02d19a
291c0f5a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
3 deletions
+32
-3
index.vue
src/components/customSettings/source/index.vue
+4
-0
project.js
src/store/modules/project.js
+5
-3
common.js
src/utils/common.js
+5
-0
properties.js
src/utils/properties.js
+18
-0
No files found.
src/components/customSettings/source/index.vue
View file @
f8719341
...
...
@@ -3,6 +3,7 @@
placement=
"top"
trigger=
"hover"
width=
"auto"
:disabled=
"!legalUrl"
:content=
"url"
>
<img
style=
"max-width: 200px;"
v-if=
"url"
:src=
"url"
alt=
""
/>
...
...
@@ -51,6 +52,9 @@ export default {
}
else
{
return
''
;
}
},
legalUrl
:
function
()
{
return
(
this
.
swvalue
+
''
).
indexOf
(
'//'
)
>
-
1
;
}
}
};
...
...
src/store/modules/project.js
View file @
f8719341
...
...
@@ -527,7 +527,9 @@ export const projectStore = {
});
if
(
_props
.
source
)
{
if
(
!
_props
.
width
||
!
_props
.
height
)
{
// imageWidth imageHeight
// 设置image类型节点的原图高宽度
if
(
!
_props
.
imageWidth
||
!
_props
.
imageHeight
)
{
let
_url
=
_props
.
source
;
//_source.value;
if
(
_url
.
indexOf
(
'asset://'
)
===
0
)
{
let
uuid
=
_url
.
split
(
'//'
)[
1
];
...
...
@@ -537,8 +539,8 @@ export const projectStore = {
let
_img
=
new
Image
();
_img
.
src
=
_url
;
_img
.
onload
=
function
()
{
_props
.
w
idth
=
_img
.
width
;
_props
.
h
eight
=
_img
.
height
;
_props
.
imageW
idth
=
_img
.
width
;
_props
.
imageH
eight
=
_img
.
height
;
commit
(
'modifyActiveView'
,
{
properties
:
_props
});
...
...
src/utils/common.js
View file @
f8719341
...
...
@@ -265,6 +265,11 @@ export const styles = {
});
}
if
(
component
.
type
===
'image'
)
{
cmpSelfProps
.
width
=
cmpSelfProps
.
width
||
cmpSelfProps
.
imageWidth
;
cmpSelfProps
.
height
=
cmpSelfProps
.
height
||
cmpSelfProps
.
imageHeight
;
}
// 获取拖拽组件的样式,只生成operatProps中的属性
if
(
onlyOpera
)
{
_
.
forIn
(
cmpSelfProps
,
(
val
,
key
)
=>
{
...
...
src/utils/properties.js
View file @
f8719341
...
...
@@ -194,6 +194,24 @@ export default {
title
:
'来源'
,
type
:
'source'
,
value
:
''
},
imageWidth
:
{
title
:
'原图宽度'
,
type
:
'input'
,
value
:
''
,
desc
:
'原图片的宽度'
,
props
:
{
disabled
:
true
}
},
imageHeight
:
{
title
:
'原图高度'
,
type
:
'input'
,
value
:
''
,
desc
:
'原图片的高度'
,
props
:
{
disabled
:
true
}
}
},
rect
:
{
...
...
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