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

目前局部 scope 的优先级高于 WXS scope 优先级 #204

Open
202225feng opened this issue Oct 22, 2024 · 1 comment
Open

目前局部 scope 的优先级高于 WXS scope 优先级 #204

202225feng opened this issue Oct 22, 2024 · 1 comment
Assignees
Labels
module:template-compiler need discussion Further discussion is needed to decide

Comments

@202225feng
Copy link

开发项目时意外把item 和wxs module命名一样了,结果变成在开发工具上显示wxs 数据,在Android和Windows客户端上显示js数据。
代码链接:https://developers.weixin.qq.com/s/z5DmCUm77ZUS
下面是开发工具、Windows、Android三个平台的情况。

微信截图_20241013163429

界面里面显示的是item的数据。
代码:
Wxml:

微信截图_20241014152403

Js:

微信截图_20241014152440

@LastLeaf
Copy link
Member

关于为什么不同,可以参考 #203

这问题看起来是 WXML 同名 scope 优先级的问题。可能需要调整下。

@LastLeaf LastLeaf self-assigned this Oct 22, 2024
@LastLeaf LastLeaf added module:template-compiler need discussion Further discussion is needed to decide labels Oct 22, 2024
@LastLeaf LastLeaf changed the title 同样的代码wx:for-item在工具和真机上显示不同数据。 局部 scope Oct 22, 2024
@LastLeaf LastLeaf changed the title 局部 scope 目前局部 scope 的优先级高于 WXS scope 优先级 Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:template-compiler need discussion Further discussion is needed to decide
Projects
None yet
Development

No branches or pull requests

2 participants