-
创建Info主键文件 <router-link to="/Info">Info</router-link>链接主键 在router里面定义Info
查看全部 -
组件状态管理:vuex
多组件混合使用,多页面,复杂业务(vue-router)
组件间的传参、消息、事件管理(props,emit/on,bus)
查看全部 -
列表渲染: v-for
查看全部 -
v-bind:绑定属性 v-on:绑定事件 条件渲染: 1.v-if: <div v-if="count > 0"> count大于0,count的值是:{{count}} </div> <div v-else> count的值是:{{count}} </div>
查看全部 -
接上一节课代码
计算属性(数据联动,可以监听很多变量):
computed{ message1: function(){ return 'computed:' + this.meg }
侦听器:
watch:{ message: function (newval.oldval) { console.log('newval is:'+newval)
console.log('oldval is:'+oldval) }
console.logo在调试窗口打印值,在console打开窗口,输入app/message = 'computed value',则会输出:
newval is: computed value
oldval is: hello vue!
页面输出(异步场景,只能监听一个变量或者数组):
computed value
computed: computed value
查看全部 -
v-on @
v-bind :
查看全部 -
Vue2.x
查看全部 -
Vue2.x
查看全部 -
Vue开发环境
查看全部 -
Vue2.x
查看全部 -
Vue2.x
查看全部 -
watch (异步场景),computed(数据联动)
查看全部 -
开发环境!
查看全部
举报
0/150
提交
取消