Vue
albert48
这个作者很懒,什么都没留下…
展开
-
使用animate.css完成动画效果
<!DOCTYPE html><html><head> <title>TodoList</title> <script src="./vue.js"></script> <link rel="stylesheet" type="text/css" href="./animate.css">&...原创 2019-12-05 16:47:10 · 221 阅读 · 0 评论 -
Vue中的插槽
<!DOCTYPE html><html><head> <title>change color</title> <script src="./vue.js"></script></head><body> <div id='app'> <body-cont...原创 2019-12-05 15:15:12 · 94 阅读 · 0 评论 -
非父子组件之间的传值
<!DOCTYPE html><html><head> <title>change color</title> <script src="./vue.js"></script></head><body> <div id='app'> <child con...原创 2019-12-05 14:27:15 · 80 阅读 · 0 评论 -
Vue中的DOM(ref,emit)
<!DOCTYPE html><html><head> <title>change color</title> <script src="./vue.js"></script></head><body> <div id='app'> <div ref='...原创 2019-12-05 11:40:47 · 158 阅读 · 0 评论 -
子组件定义data
子组件定义data,并不能像根组件那样定义成对象,而是应该定义成函数,并把值进行返回因为子组件会被调用很多次,并不希望子组件的数据和其他组件的数据产生冲突,所以通过函数返回对象让每个子组件都有独立的数据<!DOCTYPE html><html><head> <title>change color</title> <...原创 2019-12-05 11:15:54 · 484 阅读 · 0 评论 -
is属性
<!DOCTYPE html><html><head> <title>change color</title> <script src="./vue.js"></script></head><body> <div id='app'> <table>...原创 2019-12-05 10:55:23 · 802 阅读 · 0 评论 -
样式绑定
对象绑定<!DOCTYPE html><html lang="en"><head> <meta charset="utf-8"> <title>click to change the color</title> <script src="./vue.js"></script> <st...原创 2019-12-05 09:23:02 · 97 阅读 · 0 评论 -
计算属性的set、get
<!DOCTYPE html><html><head> <title</title> <script src="./vue.js"></script></head><body> <div id="app">{{fullName}}</div> <s...原创 2019-12-04 23:55:33 · 269 阅读 · 0 评论 -
计算属性 watch
<!DOCTYPE html><html><head> <title</title> <script src="./vue.js"></script></head><body> <div id="app">{{fullName}}{{age}}</div>...原创 2019-12-04 23:46:17 · 95 阅读 · 0 评论 -
v-text,v-html,{{}}
v-text 和 {{}} 作用是一样的v-html 会对html进行解析原创 2019-12-04 23:18:26 · 73 阅读 · 0 评论 -
组件的注册
局部组件注册<!DOCTYPE html><html><head> <title>TodoList</title> <script src="./vue.js"></script></head><body> <div id='root'> <input ...原创 2019-12-04 21:40:05 · 90 阅读 · 0 评论 -
MVP和MVVM
MVPM Model ; V view ; P presenter在用JQuery写代码的时候,大部分操作都是操作DOM,所以presenter层对其来说很重要。MVVM没有控制器,而换成了ViewModel。我们并不需要关注VM层是怎么实现的,它是Vue内置的。M层的数据发生变化,V层也随之发生变化,反之也是。...原创 2019-12-04 20:40:09 · 77 阅读 · 0 评论