<template>
<div>
<el-upload
list-type="picture-card"
:limit="limit"
:file-list="fileList"
:on-preview="preview"
:on-remove="handleRemove"
:on-change="handleChange"
:before-upload="beforeUpload"
:http-request="upload"
:class="{disabled: fileComputed }"
action="#"
>
<i class="el-icon-plus" />
</el-upload>
<el-progress v-if="showPercent" style="width: 180px" :percentage="percent" />
<el-dialog title="图片" :visible.sync="showDialog">
<img :src="imgUrl" style="width:100%" alt="">
</el-dialog>
</div>
</template>
<script>
import COS from 'cos-js-sdk-v5'
使用 el-upload 完成腾讯云的图片上传功能
最新推荐文章于 2023-10-25 16:28:55 发布