[Doc] update code style (#484)

This commit is contained in:
neverland
2017-12-26 12:39:52 +08:00
committed by GitHub
parent 508cdfc0c9
commit 6b563b2e5a
68 changed files with 431 additions and 431 deletions
+6 -6
View File
@@ -12,7 +12,7 @@ Vue.use(Uploader);
#### 基础用法
```html
<van-uploader :afterRead="logContent">
<van-uploader :after-read="onRead">
<van-icon name="photograph" />
</van-uploader>
```
@@ -20,7 +20,7 @@ Vue.use(Uploader);
```javascript
export default {
methods: {
logContent(file) {
onRead(file) {
console.log(file)
}
}
@@ -31,7 +31,7 @@ export default {
可以直接在 Uploader 上设置 accpet、multiple 等原生属性,input 会自动继承该属性
```html
<van-uploader :afterRead="logContent" accept="image/gif, image/jpeg" multiple>
<van-uploader :after-read="onRead" accept="image/gif, image/jpeg" multiple>
<van-icon name="photograph" />
</van-uploader>
```
@@ -40,10 +40,10 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
| resultType | 读取文件的方式,以base64的方式读取;以文本的方式读取 | `String` | `dataUrl` | `text` |
| result-type | 读取文件的方式,以base64的方式读取;以文本的方式读取 | `String` | `dataUrl` | `text` |
| disable | 是否禁用上传,在图片上传期间设置为true,禁止用户点击此组件上传图片 | `Boolean` | `false` | - |
| beforeRead | 读文件之前的钩子,参数为选择的文件,若返回 false 则停止读取文件 | `Function` | - | - |
| afterRead | 文件读完之后回调此函数,参数为 { file:'选择的文件',content:'读的内容' } | `Function` | - | - |
| before-read | 读文件之前的钩子,参数为选择的文件,若返回 false 则停止读取文件 | `Function` | - | - |
| after-read | 文件读完之后回调此函数,参数为 { file:'选择的文件',content:'读的内容' } | `Function` | - | - |
### Slot