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

taro v3.0.7打包成支付宝小程序,picker-view内容为空 #7774

Closed
git-guining opened this issue Sep 30, 2020 · 3 comments
Closed

taro v3.0.7打包成支付宝小程序,picker-view内容为空 #7774

git-guining opened this issue Sep 30, 2020 · 3 comments
Labels
F-vue2 Framework - Vue 2 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x

Comments

@git-guining
Copy link

相关平台

支付宝小程序

小程序基础库: 支付宝小程序无
使用框架: Vue 2

复现步骤

taro v3.0.7使用picker-view打包成支付宝小程序后,picker-view中的内容都为空,用支付宝小程序原生显示正常,打包成微信小程序也显示正常。

期望结果

打包成支付宝小程序后picker-view正常显示

实际结果

打包成支付宝小程序后picker-view内容为空

环境信息

👽 Taro v3.0.7


  Taro CLI 3.0.7 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 12.13.1 - D:\Program Files\nodejs\node.EXE
      Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 6.12.1 - D:\Program Files\nodejs\npm.CMD
@taro-bot2 taro-bot2 bot added F-vue2 Framework - Vue 2 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x labels Sep 30, 2020
@luckyadam
Copy link
Member

试试最新版本呢

@git-guining
Copy link
Author

3.0.7之后的所有版本打包都会报错。

@Chen-jj
Copy link
Contributor

Chen-jj commented Oct 14, 2020

@git-guining 复现不了,v3.0.14

<template>
  <view class="index">
    <picker-view indicator-style="height: 50px;" style="width: 100%; height: 300px;" :value="value">
      <picker-view-column>
        <view v-for="item in years" style="line-height: 50px; text-align: center;">{{item}}年</view>
      </picker-view-column>
      <picker-view-column>
        <view v-for="item in months" style="line-height: 50px; text-align: center;">{{item}}月</view>
      </picker-view-column>
      <picker-view-column>
        <view v-for="item in days" style="line-height: 50px; text-align: center;">{{item}}日</view>
      </picker-view-column>
    </picker-view>
  </view>
</template>

<script>
import './index.scss'

export default {
  data () {
    const date = new Date()
    const years = []
    const months = []
    const days = []

    for (let i = 1990; i <= date.getFullYear(); i++) {
      years.push(i)
    }

    for (let i = 1; i <= 12; i++) {
      months.push(i)
    }

    for (let i = 1; i <= 31; i++) {
      days.push(i)
    }
    return {
      years,
      year: date.getFullYear(),
      months,
      month: 2,
      days,
      day: 2,
      value: [9999, 1, 1],
      isDaytime: true,
    }
  }
}
</script>

image

@Chen-jj Chen-jj closed this as completed Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue2 Framework - Vue 2 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

3 participants