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