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

不同的module不能bind同一个data #2

Open
NewCai opened this issue Feb 21, 2019 · 2 comments
Open

不同的module不能bind同一个data #2

NewCai opened this issue Feb 21, 2019 · 2 comments

Comments

@NewCai
Copy link

NewCai commented Feb 21, 2019

两个module去bind同一个data的话,只有第一个生效

@chexiongsheng
Copy link
Owner

module含data,不能绑定什么data。
是ui里头的元素绑定到某个module的data。

@NewCai
Copy link
Author

NewCai commented Feb 22, 2019

不好意思,是我的表述有点问题。在实际项目中,不同的module很有可能会引用到外部同一个table,我发现在这样的情况下,绑定行为会出现问题。这个问题可以通过在你的App场景中,将module1,module2的data都指向data2,然后将所有inputfield和text元素都绑定到data.message复现。理论上,在这种场景下,改变data2.message应当能将数据同步到所有inputfield和text元素,但是在这个测试中,总有一个inputfield不能同步到数据。

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