🏠 Homepage
npm install img-load-size --save-dev
import ImgLoadSize from 'img-load-size'
// 项目入口文件引用插件
import ImgLoadSize from 'img-load-size'
Vue.use(ImgLoadSize)
// vue文件中使用
<ImgLoadSize :width="750" :height="200" :action="upLoadAction" :is-only-width="false"/>
- width图片宽度限制
- height图片高度限制
- action图片上传成功后的回调函数,upLoadAction(base,file),base返回的base64,file返回的formdata格式
- is-only-width是否只对宽度进行限制
- min-file-size 文件最小字节限制
- max-file-size 文件最大字节限制
👤 wangpan
- Github: @wangpanhb
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2019 wangpan.
This project is ISC licensed.
This README was generated with ❤️ by readme-md-generator