摘要: v-for="item in data" data() { return { datas: [], search: "" }; }, data() { return { datas: [], search: "" }; }, data() { return { datas: [], search: 阅读全文
posted @ 2019-04-03 13:40 雨雪粪痘凯文 阅读(573) 评论(0) 推荐(0) 编辑
摘要: <input type="checkbox" value="Vue.js" v-model="data"> data(){return{data:[]//初始化为空数组[],v-model绑定value 否则为布尔}} <input type="checkbox" value="Vue.js" v- 阅读全文
posted @ 2019-04-03 13:25 雨雪粪痘凯文 阅读(471) 评论(0) 推荐(0) 编辑
摘要: //自定义函数 指令 //.vue <div v-AA:BB="'CC'" > <div v-AA:BB="'CC'" > //.vue局部指令 directives: { AA: { bind(el, binding, vnode) { el.style.color = "#" + Math.ra 阅读全文
posted @ 2019-04-03 13:13 雨雪粪痘凯文 阅读(118) 评论(0) 推荐(0) 编辑
摘要: //过滤器 //.vue <div>{{data | functionname}}</div> //.vue局部 filters:{ //ES5 // "to-uppercase":function(value){ // return value.toUpperCase(); // } //ES6 阅读全文
posted @ 2019-04-03 13:05 雨雪粪痘凯文 阅读(113) 评论(0) 推荐(0) 编辑
摘要: //cmd npm vue-resource --save //main.js import VueResource from 'vue-resource' Vue.use(VueResource) //.vue post:function(){ this.$http.post("url",{myd 阅读全文
posted @ 2019-04-03 13:03 雨雪粪痘凯文 阅读(106) 评论(0) 推荐(0) 编辑
摘要: #app *{} //APP下所有样式 div{cursor: pointer};//鼠标移过有手 #app *{} //APP下所有样式 div{cursor: pointer};//鼠标移过有手 阅读全文
posted @ 2019-04-03 12:52 雨雪粪痘凯文 阅读(119) 评论(0) 推荐(0) 编辑
摘要: <style scopred> scopred——样式仅对当前组件页面生效 阅读全文
posted @ 2019-04-03 12:47 雨雪粪痘凯文 阅读(151) 评论(0) 推荐(0) 编辑
摘要: //routes.js import AA from './components/AA.vue' import BB from './components/BB.vue' import CC from './components/CC.vue' export default[ {path:"/",c 阅读全文
posted @ 2019-04-03 12:40 雨雪粪痘凯文 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 表达式 (expr1) ? (expr2) : (expr3) 在 expr1 求值为 TRUE 时的值为 expr2,在 expr1 求值为 FALSE 时的值为 expr3。 普通用法 当你发现你经常用if else 代码如下: if(拜春哥 || 拜考试帝){ 不挂科; }else{ 门门挂; 阅读全文
posted @ 2019-04-03 12:32 雨雪粪痘凯文 阅读(4323) 评论(0) 推荐(1) 编辑
摘要: :class=“[classname,{classname2:true}]” 阅读全文
posted @ 2019-04-03 12:31 雨雪粪痘凯文 阅读(338) 评论(0) 推荐(0) 编辑