摘要: computed和methods区别 效果是一样的,但是 computed 是基于它的依赖缓存,只有相关依赖发生改变时才会重新取值。 而methods,在重新渲染的时候,函数总会重新调用执行。 阅读全文
posted @ 2017-05-22 01:09 微笑代表淡定.Net 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1.转换为大写字符 .toUpperCase() 2.字符串反转 this.message = this.message.split('').reverse().join('') 3.从index开始截取字符串 value.slice(index) 4.按index取字符串 value.charAt 阅读全文
posted @ 2017-05-22 00:42 微笑代表淡定.Net 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 1.绑定文本( v-model='MSG') {{MSG}} 2.绑定html(v-html='') 3.绑定标签属性(v-bind:属性名(如:href | class等)=''),简写形式:@属性名='' <label for="i1">修改颜色:</label> <input type="ch 阅读全文
posted @ 2017-05-22 00:28 微笑代表淡定.Net 阅读(257) 评论(0) 推荐(0) 编辑