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-view Vue 环境 在淘宝/支付宝小程序表现 异常 #11367

Open
yijinc opened this issue Feb 28, 2022 · 2 comments
Open

picker-view Vue 环境 在淘宝/支付宝小程序表现 异常 #11367

yijinc opened this issue Feb 28, 2022 · 2 comments
Labels
F-vue3 Framework - Vue 3 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x

Comments

@yijinc
Copy link
Contributor

yijinc commented Feb 28, 2022

相关平台

支付宝小程序

复现仓库

https://github.com/暂无线上链接
小程序基础库: 111
使用框架: Vue 3

复现步骤

使用对象数组遍历选项

<template>
  <picker-view :value="value" @change="onChange">
    <picker-view-column>
      <view v-for="(item, index) in options" :key="index">{{ item.label }}</view>
    </picker-view-column>
  </picker-view>
</template>

<script>
  export default {
    name: "Index",
    data() {
      return {
        options: [
          { label: '选项一', value: 1 },
          { label: '选项二', value: 2 },
          { label: '选项三', value: 3 },
          { label: '选项四', value: 4 },
          { label: '选项五', value: 5 },
          { label: '选项六', value: 6 },
        ],
        value: [1],
      }
    },
    methods: {
      onChange: function(e) {
        console.log('onChange', e.detail.value, this.options);
      }
    }
  }
</script>

期望结果

range 正常展示,value 正常回调

实际结果

1,循环option 上下多出了一个空行
2,change 事件回调函数偶尔会多一列value 值

环境信息

👽 Taro v3.3.16


  Taro CLI 3.3.16 environment info:
    System:
      OS: macOS 12.0.1
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
      Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.0/bin/yarn
      npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm

@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x labels Feb 28, 2022
@github-actions
Copy link
Contributor

等待热心的小伙伴解决问题中..., 有一些相关的 issues 可能帮助到你!

Thank you so much!

@MaiYaoqiang
Copy link

同样的问题,楼主有找到解决方案了吗,这个也导致了nut-ui的picker在支付宝环境出bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants