.net 保存base64 图片_Vue 图片上传组件(base64 版):vue-upload-imgs

v2-ac55a42f3b0991ca1ec0f7159525d543_1440w.jpg?source=172ae18b

vue-upload-imgs 上传组件保存的是图片的 base64 码,这是项目地址,欢迎关注。

在线 demo

  • 预览模式
  • 列表模式
  • 禁用

文档

v2-0a5fa78756a6d6fa03b79959a4f8d766_b.jpg

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文件中直接引用

<
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值