![](https://i-blog.csdnimg.cn/columns/default/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
前端
A 石头
这个作者很懒,什么都没留下…
展开
-
自己总结的 git 使用
Git 常用命令 git 四连 git add . // 将所有的改动放进暂存区 git commit -m '描述' // 提交并附带概要信息 git pull // con远程仓库拉取代码 git push // 推送代码到远程仓库(master分支) git其余常用命令 git log // 查看日志 git log -p // 查看详细历史 git原创 2020-11-06 09:51:33 · 133 阅读 · 0 评论 -
mockjs在vue项目中的基本使用
一、使用mockjs的背景 在后端接口没有开发之前,前端可以自己模拟接口进行开发,并且可以实现请求的拦截,根据mockjs的规则来实现随机模拟数据返回的数据进行交互,进而达到前后端分离开发。 二、vue项目中引入mockjs npm install mockjs -save 三、使用mockjs 1、基础使用 在根目录中新建一个mock文件夹,并新建index.js const Mock = require('mockjs'); Mock.mock('/user/userInfo', 'post', r原创 2020-10-30 13:43:40 · 286 阅读 · 0 评论 -
自己总结的 common.js
/** * 日期 时间 * @param data 日期 * @param sign / - 其他 * @returns xxxx-xx-xx hh:mm:ss */ function formatDateAll(data, sign) { date = data || new Date(); sign = sign || ""; var y = date.getFullYear(); var m = addZero(date.getMonth() + 1); var d = ..原创 2020-07-30 17:11:23 · 145 阅读 · 0 评论 -
处理菜单数组的数的算法
// 传入 数组 和最外层id getTree(list,pid){ let items = {}; for(let i= 0 ;i<list.length;i++){ let key = list[i].pid; if(items[key]){ items[key].push(list[i]); }else { items[key] =[]; items[ke.原创 2020-07-26 17:33:05 · 141 阅读 · 0 评论 -
web 端实现 vue键盘弹窗
1.keyboard.vue <template> <div class="keyboard" v-show="showKeyboard" > <p v-for="(keys,index) in keyList" :key="index"> <template> <span v-for="(key,index) in keys" :key="index" class="keytext">原创 2020-07-21 15:51:00 · 458 阅读 · 0 评论 -
几种请求之原生ajax请求
js ajax 请求get 请求post 请求总结:为了方便使用,我们可以把他封装进方法里面,要用的时候,直接调用就好了 get 请求 //1.创建异步对象 var ajax = new XMLhttpRequest(); //2.设置请求参数 请求方式 和 请求地址 ajax .open ('get','xxxx/xxxx?xx=xxxx'); //3.发送请求 ajax.send(); //4...原创 2018-12-05 11:04:52 · 545 阅读 · 0 评论