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

form表单提交函数无法获取picker的name值 #1545

Closed
YangsonHung opened this issue Apr 9, 2020 · 3 comments
Closed

form表单提交函数无法获取picker的name值 #1545

YangsonHung opened this issue Apr 9, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@YangsonHung
Copy link

问题描述
form组件内的picker组件设置了name属性,点击设置了form-type属性的button,返回值里没有picker的name属性的变量值
代码
精简过

<form @submit="formSubmit" @reset="formReset">
    <picker name="picker" @change="bindPickerChange" :value="index" :range="array" range-key="name">
        <view class="uni-input">{{array[index].name}}</view>
    </picker>
    <view class="uni-btn-v">
        <button form-type="submit">Submit</button>
	<button type="default" form-type="reset">Reset</button>
    </view>
</form>
    formSubmit: function(e) {
       console.log('form发生了submit事件,携带数据为:' + JSON.stringify(e.detail.value))
    }

image

预期结果
点击submit按钮后,返回值里要有picker的name属性变量picker值的,实际没有

实际结果
image
image

系统信息:

  • 发行平台: 5+app
  • 操作系统: Android 9.0
  • HBuilderX版本 2.6.9.20200403
  • uni-app版本
  • 设备信息 坚果Pro3

补充信息
在H5平台测试过了,没有问题

@guajiguaji-dd
Copy link

我也遇到,可以看下我的(1534),原因就是因为V3编译,可以看下2.6.9的更新日志,app编译默认V3编译

@Wangyaqi
Copy link
Contributor

此问题会在下个alpha版本修复

@zhetengbiji
Copy link
Collaborator

HBuilderX 2.6.12 alpha 已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants