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

Picker 选择器 默认会选第一个,按照select的逻辑默认是没有选中任何选项 #2956

Closed
febelery opened this issue Mar 10, 2024 · 2 comments

Comments

@febelery
Copy link

NutUI 包名

@nutui/nutui

NutUI 版本号

4.3.1

平台

h5

重现链接

https://nutui.jd.com/h5/vue/4x/#/zh-CN/component/picker

重现步骤

<!--  <默认会选中第一个,未找到默认不选择方案> -->
<nut-cell
  class="border-wrapper"
  title=" '请选择'"
  is-link
  @click="visible = true"
></nut-cell>
<nut-popup v-model:visible="visible" position="bottom">
  <nut-picker
    v-model="formData.data"
    three-dimensional
    :columns="[
      { text: '南京', value: 'Nanjing' },
      { text: '无锡', value: 'Wuxi' },
    ]"
  />
</nut-popup>

formData = ref({data:null})

期望的结果是什么?

默认不选中

实际的结果是什么?

默认会选中第一个

环境信息

No response

其他补充信息

No response

@zxlmmmm
Copy link

zxlmmmm commented Mar 11, 2024

This is a same question which hanppend to me. Please click this link.
#2946

@eiinu
Copy link
Member

eiinu commented Mar 11, 2024

Picker 的交互设计可以参考微信 picker-view,这种形式下不存在选中空值的展示逻辑。

@eiinu eiinu closed this as not planned Won't fix, can't repro, duplicate, stale Mar 12, 2024
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

3 participants