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

CHAT对象,在不同页面如何做到同步变化(响应式) #7

Open
jiaozhe0 opened this issue Jun 22, 2017 · 2 comments
Open

Comments

@jiaozhe0
Copy link

我看到你是在ChatBody.vue文件 里把 数据渲染出来的,是直接导入CHAT 对象,然后把CHAT.msgArr属性传递给子组件,那是如何做到Chat对象属性改变,ChatBody.vue 组件的Chat 对象也响应式的改变了(同步)

@secreter
Copy link
Owner

vue是一个数据驱动的前端框架,你可以看看它的介绍

@jiaozhe0
Copy link
Author

我知道,如果要做的响应式,不是应该把CHAT这个普通对象给vue实例的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