1.1.4 • Published 5 years ago

img-load-size v1.1.4

Weekly downloads
8
License
ISC
Repository
github
Last release
5 years ago

介绍 该模块主要针对加载图片功能,同时支持上传图片大小的判断

🏠 Homepage

效果图

  • 限制宽高 npm.io
  • 限制大小 npm.io

Install

npm install img-load-size --save-dev

Usage

import ImgLoadSize from 'img-load-size'

Run tests

// 项目入口文件引用插件
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 文件最大字节限制

Author

👤 wangpan

🤝 Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2019 wangpan. This project is ISC licensed.


This README was generated with ❤️ by readme-md-generator

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago