![v2-ac55a42f3b0991ca1ec0f7159525d543_1440w.jpg?source=172ae18b](http://img-02.proxy.5ce.com/view/image?&type=2&guid=a24ce3a3-512e-eb11-8da9-e4434bdf6706&url=https://pic2.zhimg.com/v2-ac55a42f3b0991ca1ec0f7159525d543_1440w.jpg?source=172ae18b)
vue-upload-imgs 上传组件保存的是图片的 base64 码,这是项目地址,欢迎关注。
在线 demo
- 预览模式
- 列表模式
- 禁用
文档
![v2-0a5fa78756a6d6fa03b79959a4f8d766_b.jpg](http://img-01.proxy.5ce.com/view/image?&type=2&guid=a24ce3a3-512e-eb11-8da9-e4434bdf6706&url=https://pic3.zhimg.com/v2-0a5fa78756a6d6fa03b79959a4f8d766_b.jpg)
![v2-c65217a1ba8a1223653399684da8143d_b.jpg](http://img-03.proxy.5ce.com/view/image?&type=2&guid=a24ce3a3-512e-eb11-8da9-e4434bdf6706&url=https://pic2.zhimg.com/v2-c65217a1ba8a1223653399684da8143d_b.jpg)
使用
在单文件组件中引用
npm i vue-upload-imgs
import Vue from 'vue'
import VueUploadImgs from 'vue-upload-imgs'
Vue.use(VueUploadImgs)
<template>
<div>
<VueUploadImgs
multiple
compress
:before-read="beforeRead"
:after-read="afterRead"
:before-remove="beforeRemove"
:limit="limit"
:type="type"
@preview="preview"
@exceed="exceed"
@oversize="oversize"
v-model="files"
>
</VueUploadImgs>
</div>
</template>
在HTML文件中直接引用
<