会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
谎渊
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
2021年10月7日
vue axios跨域
摘要: 安装axios npm install axios 在vue.config.js文件 module.exports={ devServer:{ https:false, open:false, proxy:{ //根目录地址使用文件导入时不用添加引号使用中括号 '根目录地址':{ target: /
阅读全文
posted @ 2021-10-07 14:33 谎渊
阅读(28)
评论(0)
推荐(0)
2021年10月5日
js事件委托
摘要: 使用addEventListener('事件类型',函数,false?true冒泡?捕获)方法 <ul> <li>1</li> <li>2</li> </ul> var uls=document.querySelector('ul') uls.addEventListener('click',fun
阅读全文
posted @ 2021-10-05 14:07 谎渊
阅读(22)
评论(0)
推荐(0)
2021年9月28日
构造函数 原型对象 实例
摘要: 构造函数 function Myfun(){ this.height=170 this.weight=100 } 原型对象 Myfun.prototype.name="小林" 实例 var Myfuns=new Myfun() console.log(Myfuns.height)//170 cons
阅读全文
posted @ 2021-09-28 23:57 谎渊
阅读(15)
评论(0)
推荐(0)
es6数组方法
摘要: 可用箭头函数 (v,i)=>{ } 或 (v,i)=>v==条件? v:false //不能使用return 判断是否存在这个元素 arr.includes(元素值) 返回值 true false 判断符合条件的元素 arr.find(v=>v==条件) 返回 该元素 (只返回一个值) arr.fi
阅读全文
posted @ 2021-09-28 23:48 谎渊
阅读(28)
评论(0)
推荐(0)
解决异步promise async await
摘要: vue || js promise fun(){ var this=that new promise((resolve,reject)=>{ that.get().then(res=>{ resolve(res) }) }).then(res=>{ console.log(res) }) } 或 f
阅读全文
posted @ 2021-09-28 23:24 谎渊
阅读(21)
评论(0)
推荐(0)
数组排序sort()
摘要: 在对象.sort()里使用一个函数,这个函数要给一个排序标准的元素名称 let key='元素名称' let arrSort=(key)=>{ return (after,before)=>{ let afters=after[key] let befores=before[key] if(afte
阅读全文
posted @ 2021-09-28 23:13 谎渊
阅读(25)
评论(0)
推荐(0)
Gitee命令
摘要: 删除本地注册表用户信息 注:注册表用户信息,用户名为邮箱,密码为密码 (同后期弹出的输入密码窗口) 设置账号信息 输入一次即可 git config --global user.name "用户名" git config --global user.email "邮箱" 查看 账号信息 git co
阅读全文
posted @ 2021-09-28 22:43 谎渊
阅读(31)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
公告