https://github.com/dxcweb/dxc-upload
截图后粘贴、拖拽和点击上传预览,图片压缩。
https://github.com/dxcweb/dxc-upload
Last synced: about 1 year ago
JSON representation
截图后粘贴、拖拽和点击上传预览,图片压缩。
- Host: GitHub
- URL: https://github.com/dxcweb/dxc-upload
- Owner: dxcweb
- Created: 2018-05-31T08:03:45.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T05:42:43.000Z (over 3 years ago)
- Last Synced: 2025-05-07T21:07:27.627Z (about 1 year ago)
- Language: JavaScript
- Size: 719 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dxc-upload
截图后粘贴、拖拽和点击上传预览,图片压缩。
## install
```
npm install dxc-upload --save
```
## Development
```
npm install
npm start
```
## Example
[http://github.dxcweb.com/dxc-upload/](http://github.dxcweb.com/dxc-upload/ "http://github.dxcweb.com/dxc-upload/")
## API
Name
Type
Default
Description
paste
Bool
true
是否支持粘贴
drop
Bool
true
是否支持拖拽
domain
String
document
域 document或者self 指drop或paste在什么域上
multiple
Bool
false
input multiple 属性
accept
String
image/png,image/gif,image/jpeg
允许上传文件类型
onError
Function
null
类型错误时调用参数(msg)
onChange
Function
null
输入参数files