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

怎么防止,store的data覆盖页面组件data #104

Open
atom-7 opened this issue Feb 29, 2020 · 1 comment
Open

怎么防止,store的data覆盖页面组件data #104

atom-7 opened this issue Feb 29, 2020 · 1 comment

Comments

@atom-7
Copy link

atom-7 commented Feb 29, 2020

遇到一个问题就是,我在页面写data会被store的data覆盖,我可以避免不被覆盖,,但是变量名就要注意很多了,有没有更好的解决办法;
我看过很多库,他们都是可以在页面声明一个字段,表示这个页面引入store的数据,这样来解决粗暴覆盖的问题

@dntzhang
Copy link
Collaborator

dntzhang commented Mar 7, 2020

非纯组件不要使用自己的 data

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