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

[Bug]: wx:for with wx:if/wx:else #25

Open
iChenLei opened this issue Nov 8, 2021 · 0 comments
Open

[Bug]: wx:for with wx:if/wx:else #25

iChenLei opened this issue Nov 8, 2021 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@iChenLei
Copy link
Member

iChenLei commented Nov 8, 2021

To reproduce:

<view wx:if="{{showGoods}}" wx:for="{{goodsList}}" >{{item.name}}</view>
<block wx:else>
  <view wx:for="{{userList}}" >{{item.username}}</view>
</block>

workaround for this case:

<block wx:if="{{showGoods}}">
  <view wx:for="{{goodsList}}" >{{item.name}}</view>
</block>
<block wx:else>
  <view wx:for="{{userList}}" >{{item.username}}</view>
</block>

Current behavior:

No eslint problem hint, but get wechat miniprogram compile error

Bad attr `wx:else` with message: `wx:if not found, then something must be wrong`

Expected behavior:

lint this error

Environment information:

  • eslint version: v7
  • nodejs version: v14
  • eslint-plugin-wxml version: 0.5.0
  • your IDE/editor: VSCode
@iChenLei iChenLei added the question Further information is requested label Nov 8, 2021
@iChenLei iChenLei self-assigned this Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant