Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Chatopera OpenSource
/
ferry_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4ddb58be
authored
Sep 16, 2020
by
YuleiLan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 完善图片上传功能。
parent
314d6528
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
src/components/VueFormMaking/components/GenerateFormItem.vue
src/components/VueFormMaking/components/Upload/index.vue
src/components/VueFormMaking/components/GenerateFormItem.vue
View file @
4ddb58be
...
@@ -20,19 +20,10 @@
...
@@ -20,19 +20,10 @@
<
template
v-else-if=
"widget.type=='imgupload'"
>
<
template
v-else-if=
"widget.type=='imgupload'"
>
<fm-upload
<fm-upload
v-model=
"dataModel"
v-model=
"dataModel"
:disabled=
"true"
:style=
"
{'width': widget.options.width}"
:style=
"
{'width': widget.options.width}"
:width="widget.options.size.width"
:width="widget.options.size.width"
:height="widget.options.size.height"
:height="widget.options.size.height"
:token="widget.options.token"
:preview="preview"
:domain="widget.options.domain"
:multiple="widget.options.multiple"
:length="widget.options.length"
:is-qiniu="widget.options.isQiniu"
:is-delete="widget.options.isDelete"
:min="widget.options.min"
:is-edit="widget.options.isEdit"
:action="widget.options.action"
/>
/>
</
template
>
</
template
>
<
template
v-else-if=
"widget.type =='rate'"
>
<
template
v-else-if=
"widget.type =='rate'"
>
...
...
src/components/VueFormMaking/components/Upload/index.vue
View file @
4ddb58be
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
</draggable>
</draggable>
<div
<div
v-if=
"!preview"
v-show=
"(!isQiniu || (isQiniu && token)) && fileList.length
<
length
"
v-show=
"(!isQiniu || (isQiniu && token)) && fileList.length
<
length
"
class=
"el-upload el-upload--picture-card"
class=
"el-upload el-upload--picture-card"
:class=
"
{'is-disabled': disabled}"
:class=
"
{'is-disabled': disabled}"
...
@@ -126,6 +127,10 @@ export default {
...
@@ -126,6 +127,10 @@ export default {
disabled
:
{
disabled
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
preview
:
{
type
:
Boolean
,
default
:
false
}
}
},
},
data
()
{
data
()
{
...
@@ -228,7 +233,7 @@ export default {
...
@@ -228,7 +233,7 @@ export default {
if
(
resData
&&
uploadUrl
)
{
if
(
resData
&&
uploadUrl
)
{
this
.
$set
(
this
.
fileList
,
this
.
fileList
.
findIndex
(
item
=>
item
.
key
===
key
),
{
this
.
$set
(
this
.
fileList
,
this
.
fileList
.
findIndex
(
item
=>
item
.
key
===
key
),
{
...
this
.
fileList
[
this
.
fileList
.
findIndex
(
item
=>
item
.
key
===
key
)],
...
this
.
fileList
[
this
.
fileList
.
findIndex
(
item
=>
item
.
key
===
key
)],
url
:
resData
.
u
rl
,
url
:
uploadU
rl
,
percent
:
100
percent
:
100
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
...
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