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把原生小程序转成多端的时候,编译成h5却发现wx:if没有转换过来,这怎么解决? #1876

Closed
luodanyalian opened this issue Jan 10, 2019 · 2 comments
Assignees

Comments

@luodanyalian
Copy link

luodanyalian commented Jan 10, 2019

原生小程序源码:

<view class="main">
  <switch-tab tab-array="{{['未使用', '已失效']}}" tab-index="{{showTab}}" bind:callback="_switchTab">
    <view slot="slot-1">
      <view class="unused-list coupon-list" wx:if="{{couponList.length > 0}}">
        <view class="coupon coupon-unused" wx:for="{{couponList}}" wx:key="{{index}}" bindtap="_couponDetail" data-id="{{item.id}}">
          <view class="left">
            <view class="price">¥
              <text>{{item.deduct}}</text>
            </view>
            <text class="cate">{{item.type == 1 ? '折扣券' : '抵用券'}}</text>
          </view>
          <view class="right">
            <text class="name">{{item.title}}</text>
            <view class="date">
              <text class="wrap green" wx:if="{{item.expire_days > 7}}">
                <text>{{item.start_date + '-' + item.end_date}}</text>
              </text>
              <text class="wrap red" wx:else>
                <text>{{item.expire_days}}天后过期</text>
              </text>
            </view>
            <text class="desc">{{item.subtitle}}</text>
          </view>
        </view>

      </view>
      <view class="no-data" wx:else>
        <icon class="icon icon-no-coupon"></icon>
        <text>没有优惠券信息</text>
      </view>
     </view>
</switch-tab>
</view>

编译报错:
image

@taro-bot
Copy link

taro-bot bot commented Jan 10, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@luodanyalian luodanyalian changed the title aro把原生小程序转成多端的时候,编译成h5却发现wx:if没有转换过来,这怎么解决? taro把原生小程序转成多端的时候,编译成h5却发现wx:if没有转换过来,这怎么解决? Jan 10, 2019
@yuche yuche added the taroize label Jan 11, 2019
@yuche
Copy link
Contributor

yuche commented Jan 14, 2019

close via 7a8c9a5

@yuche yuche closed this as completed Jan 14, 2019
@yuche yuche self-assigned this Jan 14, 2019
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