1、vue.vue
<template>
<div>
<el-form-item label="图片地址" prop="pictureAddress">
<el-upload
class="avatar-uploader"
:action="url"
:show-file-list="false"
:on-success="successHandle">
<img v-if="dataForm.pictureAddress" :src="dataForm.pictureAddress" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
data(){
return {
url: this.$http.adornUrl(`/active/upload/upImage?token=${
this.$cookie.get('token')}`),
dataForm: {
pictureAddress: ''
},