Commit 4ddb58be by YuleiLan

fix: 完善图片上传功能。

parent 314d6528
......@@ -20,19 +20,10 @@
<template v-else-if="widget.type=='imgupload'">
<fm-upload
v-model="dataModel"
:disabled="true"
:style="{'width': widget.options.width}"
:width="widget.options.size.width"
:height="widget.options.size.height"
:token="widget.options.token"
: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"
:preview="preview"
/>
</template>
<template v-else-if="widget.type =='rate'">
......
......@@ -34,6 +34,7 @@
</draggable>
<div
v-if="!preview"
v-show="(!isQiniu || (isQiniu && token)) && fileList.length < length"
class="el-upload el-upload--picture-card"
:class="{'is-disabled': disabled}"
......@@ -126,6 +127,10 @@ export default {
disabled: {
type: Boolean,
default: false
},
preview: {
type: Boolean,
default: false
}
},
data() {
......@@ -228,7 +233,7 @@ export default {
if (resData && uploadUrl) {
this.$set(this.fileList, this.fileList.findIndex(item => item.key === key), {
...this.fileList[this.fileList.findIndex(item => item.key === key)],
url: resData.url,
url: uploadUrl,
percent: 100
})
setTimeout(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment