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
fec8f91a
Commit
fec8f91a
authored
Jun 28, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 调整crIcon 显示方式
parent
c523d306
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
17 deletions
+39
-17
index.vue
...r/component/DynamicForm/component/ColorSelector/index.vue
+1
-1
index.vue
...e/editor/component/DynamicForm/component/Upload/index.vue
+38
-16
No files found.
app/web/page/editor/component/DynamicForm/component/ColorSelector/index.vue
View file @
fec8f91a
...
...
@@ -11,7 +11,7 @@
},
data
()
{
return
{
color
:
this
.
value
,
color
:
this
.
value
||
''
,
}
},
created
()
{
...
...
app/web/page/editor/component/DynamicForm/component/Upload/index.vue
View file @
fec8f91a
...
...
@@ -2,7 +2,9 @@
<div>
<div
class=
"upload"
>
<div
class=
"upload-img"
v-if=
"img"
>
<img
:src=
"img"
>
<img
:src=
"img"
v-if=
"isUrl"
>
<cr-icon
:type=
"img"
class=
"upload-img-none-icon"
v-else
/>
<!--
<Icon
type=
"image"
size=
"20"
class=
"upload-img-none-icon"
></Icon>
-->
<div
class=
"upload-img-cover"
>
<Icon
type=
"ios-trash-outline"
@
click.native=
"handleRemove()"
></Icon>
</div>
...
...
@@ -14,7 +16,7 @@
</div>
</div>
</div>
<Input
v-model=
"img"
></Input>
<Input
v-model=
"img"
@
input=
"handleImgUrlChange"
></Input>
</div>
</
template
>
<
script
>
...
...
@@ -35,12 +37,31 @@
img
:
this
.
value
}
},
computed
:
{
containerId
()
{
return
`container_
${
this
.
id
}
`
;
},
isUrl
()
{
return
/
(
https|http
)
:
\/\/
/gi
.
test
(
this
.
img
);
}
},
watch
:
{
value
:
{
handler
(
newVal
)
{
this
.
img
=
newVal
;
},
immediate
:
true
}
},
methods
:
{
handleRemove
()
{
this
.
img
=
''
;
this
.
$emit
(
'
input
'
,
this
.
img
);
this
.
$emit
(
'
change
'
,
this
.
img
);
},
handleImgUrlChange
()
{
this
.
$emit
(
'
input
'
,
this
.
img
);
},
uploadQiniu
()
{
var
uploader
=
Qiniu
.
uploader
({
runtimes
:
'
html5
'
,
// 上传模式,依次退化
...
...
@@ -92,19 +113,7 @@
});
},
},
computed
:
{
containerId
()
{
return
`container_
${
this
.
id
}
`
;
}
},
watch
:
{
value
:
{
handler
(
newVal
)
{
this
.
img
=
newVal
;
},
immediate
:
true
}
},
mounted
()
{
this
.
uploadQiniu
();
}
...
...
@@ -132,12 +141,25 @@
position: relative;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
margin-right: 4px;
z-index: 1;
img {
width: 100%;
height: 100%;
}
&-none-icon {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: #fff;
z-index: 1;
line-height: 58px;
border: 1px solid #dddee1;
}
&-cover {
display: none;
position: absolute;
...
...
@@ -146,7 +168,7 @@
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 3;
i {
margin: 0 2px;
color: #fff;
...
...
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