- 博客(6)
- 收藏
- 关注
原创 Git 常用操作
- 拉取代码 git clone git status 查看当前改动文件 git add . (or) git add xx.js (or) git add -u (or) git add /src git commit -m "info" - 合并分支 git pull origin branch-name 合并分支前,先拉取当前分支代码 git merge...
2018-12-14 14:12:30
94
原创 vuex插件【vuex-persistedstate】页面刷新数据丢失
引入 import vuexPersistedstate from './vuex-persistedstate' export default new Vuex.Store({ modules: { ... }, plugins: [vuexPersistedstate()] // 引入 })
2018-08-28 14:51:39
3479
2
原创 VUE路由钩子
1. 实现移动端路由跳转让滚动条回到顶部 const router = new VueRouter({...}) router.afterEach((to, from, next) => { window.scrollTo(0, 0) })
2018-08-28 14:46:33
216
原创 移动端监听屏幕大小设置rem
window.onresize [当窗口大小发生改变时会触发这个事件] // config.js let setREM = () => { document.querySelector('html').style.fontSize = document.documentElement.offsetWidth / 750 * 100 + 'px' conso...
2018-07-23 10:25:29
1572
原创 js 数组API
find() And findIndex() 用来查找目标元素 let arr = [11, 2, 3, 4, 15, 6, 7, 8, 9, 10] _Find = (arr, num) => arr.find(item => item > num) console.log(_Find(arr, 10)) // 11 返回的是满足条件的那个值 ...
2018-07-18 14:57:47
123
原创 js 对象(Object)常用Api
Object.hasOwnProperty() 判断 x 对象里是否有 y 属性 let obj = { name: "xianxin" }; console.log(obj.hasOwnProperty("name")); // true console.log(obj.hasOwnProperty("age")); // false Object.defineProp...
2018-07-14 10:02:19
2001
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人