Uploader
Install
Usage
Basic Usage
Set input attr
You can set native properties such as accpet
、multiple
on Uploader, and the input will automatically inherits the attribute.
API
Attribute |
Description |
Type |
Default |
Accepted Values |
result-type |
Type of file read result |
String |
dataUrl |
text |
disable |
Whether to disable the upload |
Boolean |
false |
- |
before-read |
Hook before reading the file, return false to stop reading the file |
Function |
- |
- |
after-read |
Hook after reading the file |
Function |
- |
- |
max-size |
Max size of file |
Number |
- |
- |
Event
Event |
Description |
Arguments |
oversize |
Triggered when file size over limit |
Same as after-read |
Slot
Name |
Description |
- |
Custom icon |
afterRead parematers
Key |
Description |
Type |
file |
file object |
Object |
content |
file content |
String |