<dy-file-picker>
Example
Loading...
<dy-file-picker
style=${"width: 100%;"}
.multiple=${true}
.directory=${true}
@change=${(evt) => evt.target.value = evt.detail}>
上传文件夹
</dy-file-picker>
<dy-file-picker
style=${"width: 100%;"}
.multiple=${true}
.type=${"image"}
@change=${(evt) => evt.target.value = evt.detail}>
上传图片
</dy-file-picker>
API
Shadow DOM; Extends GemElement
Instance Properties
| Property(Attribute) |
Reactive |
Type |
Description |
type(type) |
Yes |
'file' | 'image' |
|
accept(accept) |
Yes |
string |
|
placeholder(placeholder) |
Yes |
string |
@deprecated |
directory(directory) |
Yes |
boolean |
|
disabled(disabled) |
Yes |
boolean |
|
multiple(multiple) |
Yes |
boolean |
|
change |
|
Emitter<FileItem[]> |
|
value |
Yes |
FileItem[] |
|
Instance Methods
| Method |
Type |
showPicker |
() => void |
Other
| Type |
Value |
| Event |
change |
| Slot |
unnamed |
| Part |
button, item |