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

[vue] 你是从vue哪个版本开始用的?你知道1.x和2.x有什么区别吗? #546

Open
haizhilin2013 opened this issue Jul 2, 2019 · 6 comments
Labels
vue vue

Comments

@haizhilin2013
Copy link
Collaborator

[vue] 你是从vue哪个版本开始用的?你知道1.x和2.x有什么区别吗?

@haizhilin2013 haizhilin2013 added the vue vue label Jul 2, 2019
@Wu-wb
Copy link

Wu-wb commented Jul 12, 2019

像1.0与2.0,我只知道一点-。-
1、 2.0生命生命周期变化感觉变得更加语义化一点(有规律可寻,更好记了),而且增加了beforeUpdate、updated、activated、deactivated,删除了attached、detached。
2、2.0将1.0所有自带的过滤器都删除了,也就是说,在2.0中,要使用过滤器,则需要我们自己编写,以下是一个自定义过滤器示例,
Vue.filter('toDou',function(n,a,b){
return n<10?n+a+b:''+n;
});

@Sawyer-li
Copy link

vue1.0的数据绑定完全依赖于数据侦测,使用Object.defineProperty方法使数据去通知相应watch,改变dom结构。vue2.0引入了虚拟dom,只通知到组件,提升了颗粒度。

@JerichoDing
Copy link

我记得1.x有全局通知功能,后面移除了

:octocat: From gitme iOS

@cllemon
Copy link

cllemon commented Sep 10, 2019

从 Vue 1.x 迁移

@diyidilei
Copy link

2.0开始用,知道一点,很少

@lsy-carlos
Copy link

v-html在1.0是可以{{{xx}}}表示的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vue vue
Projects
None yet
Development

No branches or pull requests

7 participants