mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[Doc] Upadloer: update demo title (#3605)
This commit is contained in:
parent
dea0d28361
commit
a0d2efd9bb
@ -169,7 +169,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/uploader',
|
path: '/uploader',
|
||||||
title: 'Uploader 图片上传'
|
title: 'Uploader 文件上传'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<van-uploader
|
<van-uploader
|
||||||
v-model="fileList"
|
v-model="fileList"
|
||||||
multiple
|
multiple
|
||||||
|
accept="*"
|
||||||
/>
|
/>
|
||||||
</demo-block>
|
</demo-block>
|
||||||
|
|
||||||
@ -43,16 +44,16 @@
|
|||||||
export default {
|
export default {
|
||||||
i18n: {
|
i18n: {
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
upload: '上传图片',
|
upload: '上传文件',
|
||||||
preview: '图片预览',
|
preview: '文件预览',
|
||||||
maxCount: '限制上传数量',
|
maxCount: '限制上传数量',
|
||||||
beforeRead: '上传前校验',
|
beforeRead: '上传前校验',
|
||||||
uploadStyle: '自定义上传样式',
|
uploadStyle: '自定义上传样式',
|
||||||
invalidType: '请上传 jpg 格式图片'
|
invalidType: '请上传 jpg 格式图片'
|
||||||
},
|
},
|
||||||
'en-US': {
|
'en-US': {
|
||||||
upload: 'Upload Image',
|
upload: 'Upload File',
|
||||||
preview: 'Preview Image',
|
preview: 'Preview File',
|
||||||
maxCount: 'Max Count',
|
maxCount: 'Max Count',
|
||||||
beforeRead: 'Before Read',
|
beforeRead: 'Before Read',
|
||||||
uploadStyle: 'Upload Style',
|
uploadStyle: 'Upload Style',
|
||||||
|
@ -26,7 +26,7 @@ export default {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### Preview Image
|
### Preview File
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-uploader v-model="fileList" multiple />
|
<van-uploader v-model="fileList" multiple />
|
||||||
|
@ -14,7 +14,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-uploader">
|
<div class="van-uploader">
|
||||||
<div class="van-uploader__wrapper">
|
<div class="van-uploader__wrapper">
|
||||||
<div class="van-uploader__upload"><i class="van-icon van-icon-plus van-uploader__upload-icon">
|
<div class="van-uploader__upload"><i class="van-icon van-icon-plus van-uploader__upload-icon">
|
||||||
<!----></i><input multiple="multiple" type="file" accept="image/*" class="van-uploader__input"></div>
|
<!----></i><input multiple="multiple" type="file" accept="*" class="van-uploader__input"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -31,7 +31,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-uploader__wrapper">
|
<div class="van-uploader__wrapper">
|
||||||
<div class="van-uploader__input-wrapper"><button class="van-button van-button--primary van-button--normal"><i class="van-icon van-icon-photo van-button__icon">
|
<div class="van-uploader__input-wrapper"><button class="van-button van-button--primary van-button--normal"><i class="van-icon van-icon-photo van-button__icon">
|
||||||
<!----></i><span class="van-button__text">
|
<!----></i><span class="van-button__text">
|
||||||
上传图片
|
上传文件
|
||||||
</span></button><input type="file" accept="image/*" class="van-uploader__input"></div>
|
</span></button><input type="file" accept="image/*" class="van-uploader__input"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Uploader 图片上传
|
# Uploader 文件上传
|
||||||
|
|
||||||
### 引入
|
### 引入
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ Vue.use(Uploader);
|
|||||||
|
|
||||||
### 基础用法
|
### 基础用法
|
||||||
|
|
||||||
图片上传完毕后会触发`after-read`回调函数,获取到对应的`file`对象
|
文件上传完毕后会触发`after-read`回调函数,获取到对应的`file`对象
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-uploader :after-read="afterRead" />
|
<van-uploader :after-read="afterRead" />
|
||||||
@ -126,12 +126,12 @@ export default {
|
|||||||
| preview-image | 是否在上传完成后展示预览图 | `Boolean` | `true` | 2.0.0 |
|
| preview-image | 是否在上传完成后展示预览图 | `Boolean` | `true` | 2.0.0 |
|
||||||
| preview-size | 预览图和上传区域的尺寸,单位为`px` | `String | Number` | `80px` | 2.0.0 |
|
| preview-size | 预览图和上传区域的尺寸,单位为`px` | `String | Number` | `80px` | 2.0.0 |
|
||||||
| multiple | 是否开启图片多选,部分安卓机型不支持 | `Boolean` | `false` | 2.0.0 |
|
| multiple | 是否开启图片多选,部分安卓机型不支持 | `Boolean` | `false` | 2.0.0 |
|
||||||
| disabled | 是否禁用图片上传 | `Boolean` | `false` | - |
|
| disabled | 是否禁用文件上传 | `Boolean` | `false` | - |
|
||||||
| capture | 图片选取模式,可选值为`camera`(直接调起摄像头) | `String` | - | 2.0.0 |
|
| capture | 图片选取模式,可选值为`camera`(直接调起摄像头) | `String` | - | 2.0.0 |
|
||||||
| before-read | 文件读取前的回调函数,返回`false`可终止文件读取,支持返回`Promise` | `Function` | - | - |
|
| before-read | 文件读取前的回调函数,返回`false`可终止文件读取,支持返回`Promise` | `Function` | - | - |
|
||||||
| after-read | 文件读取完成后的回调函数 | `Function` | - | - |
|
| after-read | 文件读取完成后的回调函数 | `Function` | - | - |
|
||||||
| max-size | 文件大小限制,单位为`byte` | `Number` | - | - |
|
| max-size | 文件大小限制,单位为`byte` | `Number` | - | - |
|
||||||
| max-count | 图片上传数量限制 | `Number` | - | 2.0.0 |
|
| max-count | 文件上传数量限制 | `Number` | - | 2.0.0 |
|
||||||
| result-type | 文件读取结果类型,可选值为`text` | `String` | `dataUrl` | - |
|
| result-type | 文件读取结果类型,可选值为`text` | `String` | `dataUrl` | - |
|
||||||
| upload-text | 上传区域文字提示 | `String` | - | 2.0.0 |
|
| upload-text | 上传区域文字提示 | `String` | - | 2.0.0 |
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user