jd-opensource / jd-opensource/taro-ui

ImagePicker 无法选择图片

Open
#1,127 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

### Taro UI 版本信息

3.0.0-alpha.3

### 问题描述

点击 + 按钮不弹出文件选择对话框

### 复现步骤

1. 在页面上添加最基本的 ImagePicker 组件
2. 点击 + 按钮

### 复现代码

```JSX

method === 'add' &&
this.setState({ avatar: list[0]?.url })
}
/>
```

### 报错信息

> index.umd.js:8476 Uncaught ReferenceError: _chooseImage is not defined
> at HTMLElement.AtImagePicker._this.chooseFile (index.umd.js:8476)

### 系统信息

> Taro v3.0.2
> Taro CLI 3.0.2 environment info:
> System:
> OS: Windows 10
> Binaries:
> Node: 12.18.2 - C:\Program Files\nodejs\node.EXE
> Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
> npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD

### 补充信息

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.