js
litter_lj
这个作者很懒,什么都没留下…
展开
-
Vue的小技巧
1.自动注册组件(require.context) components/index.js 将其封装成vue插件,提供install const requireComponents = require.context("./common", false, /\.vue$/); console.log(requireComponents.prototype); function to...原创 2020-04-26 11:06:34 · 264 阅读 · 0 评论 -
Js获取地址栏参数的方法
let getQueryString=(name)=>{ let reg= new RegExp(`(^|&)${name}=([^&]*)(&|$)`); let r=window.location.search.substr(1).match(req); if(r!==null) return unescape(r[2]); retur...原创 2018-12-01 09:26:08 · 154 阅读 · 0 评论 -
git命令记录
git checkout origin/develop //切换远程分支到develop分支 git checkout -b develop_20181130 //本地创建新的分支,并切换到此分支 git add . //添加所有的文件到暂存区 git commit -m '[develop][Add]增加完善信息页' //提交文件到分支 git remote add up...原创 2018-12-01 09:25:26 · 101 阅读 · 0 评论 -
js基础知识笔录一 hasOwnProperty,isPrototypeOf,Object.create
1.hasOwnProperty 判断是否存在属性,不检查原型链的,可以配合in来判断原型链是否有key class Animal { constructor(name) { this.name = name; } } Animal.prototype.originName = "原型属性测试"; let a = new Animal("dog"); cons...原创 2019-04-27 18:11:54 · 100 阅读 · 0 评论