Browse Source

商品属性图片上传修改

master
hupeng 5 years ago
parent
commit
8c32b8a1d2
  1. 6
      src/components/pic-upload-two/index.vue

6
src/components/pic-upload-two/index.vue

@ -2,7 +2,7 @@
<div> <div>
<el-upload <el-upload
class="pic-uploader-component" class="pic-uploader-component"
:action="qiNiuUploadApi" :action="uploadApi"
:headers="headers" :headers="headers"
:show-file-list="false" :show-file-list="false"
:on-success="handleUploadSuccess" :on-success="handleUploadSuccess"
@ -34,14 +34,14 @@ export default {
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'qiNiuUploadApi' 'uploadApi'
]) ])
}, },
methods: { methods: {
// //
handleUploadSuccess(response, file, fileList) { handleUploadSuccess(response, file, fileList) {
console.log(file) console.log(file)
this.$emit('input', file.response.data[0]) this.$emit('input', file.response.link)
}, },
// //
beforeAvatarUpload(file) { beforeAvatarUpload(file) {

Loading…
Cancel
Save