<template>
<div class="clearfix">
<a-upload
list-type="picture-card"
:file-list="fileList"
:headers="headers"
@preview="handlePreview"
:custom-request="customRequestFunction"
:before-upload="beforeUpload"
:remove="handelRemove"
:accept="accept"
>
<div v-if="!isMax">
<a-icon type="plus" />
<div class="ant-upload-text">
{
{
(defaultConfig && defaultConfig.word) || "Upload" }}
</div>
</div>
</a-upload>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
</div>
</template>
<script>
function getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileRe
基于antd-vue图片组件封装优化
最新推荐文章于 2023-05-30 13:52:27 发布