摘要:
charles burpsuite fiddle wireshark(不能修改封包或者发送封包) 阅读全文
摘要:
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}]” 阅读全文
摘要:
.vue data(){ return{ url:process.env.VUE_APP_UR } } .env VUE_APP_URL=https://api.com/ .env.development VUE_APP_URL=https://dev.api.com/ .env.productio 阅读全文
摘要:
const goods = require('./data/goods.json'); const ratings = require('./data/ratings.json'); const seller = require('./data/seller.json'); module.expor 阅读全文
摘要:
<script> let vm=new Vue({ el:"#app", data:{ name:"liuting", }, beforeCreate(){ console.log("创建前:"); console.log(this.$el); console.log(this.$data); }, 阅读全文
摘要:
this.$options.methods.b();// b方法中 this underfine //方法一 this.$options.methods.b(this); b(e){ console.log(e.data) } //方法二 //或者 this.$options.methods.b.b 阅读全文
摘要:
子组件接收父组件的数据可以使用props和bind进行 父组件 <abc :mydata="data"></abc> //监听子组件触发的changeHi事件,然后调用changeHi方法 子组件: props:['cdata']//接收父组件传递 <div>{{cdata}}</div> 父组件要 阅读全文
摘要:
.native给router 阅读全文
摘要:
Document.ready是 jQuery 中准备出发的事件,当加载到当前元素就执行了 Window.onload 是整个页面加载之后才执行 Document.ready是 jQuery 中准备出发的事件,当加载到当前元素就执行了 Window.onload 是整个页面加载之后才执行 阅读全文
摘要:
定义普通函数 A 在 A 中定义普通函数 B 在 A 中返回 B 执行 A,并把 A 的返回结果赋值给变量 C 执行 C 在 A 中定义普通函数 B 在 A 中返回 B 执行 A,并把 A 的返回结果赋值给变量 C 执行 C function A() { function B() { console 阅读全文
摘要:
数组 [] 对象 {} 字符串 ‘’ 布尔 true false undefined 空的变量 null 空的对象(typeof object) symbol(ES6新增,文章后面有对着新类型的解释)Symbol 生成一个全局唯一的值 数组 [] 对象 {} 字符串 ‘’ 布尔 true false 阅读全文