You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.2 KiB
52 lines
1.2 KiB
7 years ago
|
# bi.multifile_editor
|
||
|
|
||
|
## 多文件,基类[BI.Single](/core/single.md)
|
||
|
|
||
|
{% method %}
|
||
7 years ago
|
[source](https://jsfiddle.net/fineui/25r3r5fq/)
|
||
7 years ago
|
|
||
|
{% common %}
|
||
|
```javascript
|
||
|
|
||
|
BI.createWidget({
|
||
|
type: "bi.multifile_editor",
|
||
|
width: 400,
|
||
|
height: 300
|
||
|
});
|
||
|
|
||
|
|
||
|
```
|
||
|
|
||
|
{% endmethod %}
|
||
|
|
||
|
## API
|
||
|
##### 基础属性
|
||
|
| 参数 | 说明 | 类型 | 可选值 | 默认值
|
||
|
| :------ |:------------- | :-----| :----|:----
|
||
|
| multiple | 是否支持多选 | boolean | true,false| false |
|
||
7 years ago
|
| maxSize | 最大可选数量 | number |— | -1 |
|
||
7 years ago
|
| accept | 允许上传的文件类型 | string | —| " "|
|
||
7 years ago
|
| url | 文件路径 | string | —| " "|
|
||
7 years ago
|
|
||
|
|
||
|
|
||
|
## 对外方法
|
||
|
| 名称 | 说明 | 回调参数
|
||
|
| :------ |:------------- | :-----
|
||
|
| select | 选择文件 | —|
|
||
|
| getValue | 获取文件名称 | —|
|
||
|
| upload | 文件上传| —|
|
||
|
| reset | 重置| —|
|
||
|
|
||
7 years ago
|
## 事件
|
||
|
| 事件 | 说明 |
|
||
|
| :------ |:------------- |
|
||
|
|BI.MultifileEditor.EVENT_UPLOADSTART | 开始上传时触发 |
|
||
|
|BI.MultifileEditor.EVENT_PROGRESS | 上传过程中触发 |
|
||
|
|BI.MultifileEditor.EVENT_UPLOADED | 上传结束后触发 |
|
||
7 years ago
|
|
||
|
|
||
|
---
|
||
|
|
||
7 years ago
|
|