mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-29 21:06:33 +08:00
[bugfix] Uploader: can not upload pic in android (#929)
This commit is contained in:
parent
734e885727
commit
91163b2f14
@ -43,6 +43,7 @@ You can set native properties such as `accpet`、`multiple` on Uploader, and the
|
|||||||
| Attribute | Description | Type | Default | Accepted Values |
|
| Attribute | Description | Type | Default | Accepted Values |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| result-type | Type of file read result | `String` | `dataUrl` | `text` |
|
| result-type | Type of file read result | `String` | `dataUrl` | `text` |
|
||||||
|
| accept | Accepted file type | `String` | `image/*` | - |
|
||||||
| disabled | Whether to disabled the upload | `Boolean` | `false` | - |
|
| disabled | Whether to disabled the upload | `Boolean` | `false` | - |
|
||||||
| before-read | Hook before reading the file, return false to stop reading the file | `Function` | - | - |
|
| before-read | Hook before reading the file, return false to stop reading the file | `Function` | - | - |
|
||||||
| after-read | Hook after reading the file | `Function` | - | - |
|
| after-read | Hook after reading the file | `Function` | - | - |
|
||||||
|
@ -41,6 +41,7 @@ export default {
|
|||||||
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| result-type | 文件读取结果类型 | `String` | `dataUrl` | `text` |
|
| result-type | 文件读取结果类型 | `String` | `dataUrl` | `text` |
|
||||||
|
| accept | 接受的文件类型 | `String` | `image/*` | - |
|
||||||
| disabled | 是否禁用图片上传 | `Boolean` | `false` | - |
|
| disabled | 是否禁用图片上传 | `Boolean` | `false` | - |
|
||||||
| before-read | 读取前的回调函数,返回 false 可终止文件读取 | `Function` | - | - |
|
| before-read | 读取前的回调函数,返回 false 可终止文件读取 | `Function` | - | - |
|
||||||
| after-read | 读取完成后的回调函数 | `Function` | - | - |
|
| after-read | 读取完成后的回调函数 | `Function` | - | - |
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="van-uploader">
|
<div :class="b()">
|
||||||
<slot />
|
<slot />
|
||||||
<input
|
<input
|
||||||
|
v-bind="$attrs"
|
||||||
ref="input"
|
ref="input"
|
||||||
type="file"
|
type="file"
|
||||||
class="van-uploader__input"
|
:class="b('input')"
|
||||||
v-bind="$attrs"
|
:accept="accept"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
>
|
>
|
||||||
@ -24,6 +25,10 @@ export default create({
|
|||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
beforeRead: Function,
|
beforeRead: Function,
|
||||||
afterRead: Function,
|
afterRead: Function,
|
||||||
|
accept: {
|
||||||
|
type: String,
|
||||||
|
default: 'image/*'
|
||||||
|
},
|
||||||
resultType: {
|
resultType: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'dataUrl'
|
default: 'dataUrl'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user