Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoginForm组件中发现的一个问题 #1

Open
lishaoqun opened this issue Feb 4, 2020 · 1 comment
Open

LoginForm组件中发现的一个问题 #1

lishaoqun opened this issue Feb 4, 2020 · 1 comment

Comments

@lishaoqun
Copy link

问题描述

src/components/LoginForm.jsx中的一段代码 L29 ,代码如下:

function onImageClick() {
    Taro.previewImage({
      urls: [props.files[0].url],
    })
}

其中 urls: [props.files[0].url] 应该是 urls: [files[0].url]

@pftom
Copy link
Contributor

pftom commented Feb 7, 2020

@lishaoqun 你好,这里我们使用了 React Hooks 哦,在 LoginForm.jsx 组件中定义了 files 的 state,所以可以直接使用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants