摘要:
1.安装axios npm install axios 2.在main.js中引入axios 3.格式:(查询) this.$axios.get(‘http://xxx.xx.xxx/api/xxx‘).then(res => { console.log(res) //查询成功返回的值}).catc 阅读全文
posted @ 2020-11-10 18:24
大萨特
阅读(406)
评论(0)
推荐(0)
摘要:
1.安装vue-cli.(建议安装npm淘宝镜像:npm config set registry https://registry.npm.taobao.org) npm install @vue/cli -g 2.命令行工具进入安装项目路径下运行命令 npm create xxxx(自定项目新文件 阅读全文
posted @ 2020-11-10 18:19
大萨特
阅读(592)
评论(0)
推荐(0)
摘要:
如果有这样一个需求,打印对象中所有的键和值: var person = { name: '张三', age: 18, 2: '2', 11: '11'};1.使用for in: for(var key in person){ console.log(key);}//2 11 age name 2.使 阅读全文
posted @ 2020-11-10 11:13
大萨特
阅读(1496)
评论(0)
推荐(0)
摘要:
函数定义时传入形参对象,参数直接赋予默认值。但注意,当以参数列表形式设置默认值时,赋值方式是按序赋值。 function doSome_Obj({a,b=2,c}){ console.log(a,b,c);}doSome_Obj({a:5,c:22})// 5 2 22function doSome 阅读全文
posted @ 2020-11-10 09:40
大萨特
阅读(2270)
评论(0)
推荐(0)

浙公网安备 33010602011771号