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

avalon组件和父vm通讯的时候,组件属性和父vm的config属性不一致的情况 #2079

Open
yux357 opened this issue Mar 2, 2018 · 1 comment

Comments

@yux357
Copy link

yux357 commented Mar 2, 2018

avalon组件和父vm通讯的时候,组件属性和父vm config属性不一致的情况怎么处理。
比如:
有个通过 ms-for 循环出来的组件,它有一个show属性为false,我在外部点击按钮触发修改config.show=true,此时两边的show属性都为true。
但是我关闭这个组件的时候,关闭方法是直接是修改的组件中的show属性,此时这样外部的show依然为true,组件内部的show成为了false;
在非ms-for循环出的组件中,这样的问题到没啥影响,但是循环出来的组件中,我一旦修改了循环的数组,组件会被重新渲染,这时config.show === false就会导致组件消失了。

这个问题现在有没有好的实践?

@zwcan241
Copy link

你用的什么版本

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