会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
秃头的铲屎官
CnBlogs
Home
New Post
Contact
Admin
Subscription
上一页
1
···
4
5
6
7
8
9
10
11
下一页
2020年12月4日
JS实现:输入某一天日期,获取该日所在周的所有日期
initShowMeetDay(day){ this.thisWeekDay = this.getWeekDays(day) }, getWeekDays(input_day){ let oneDayTime = 1000 * 60 * 60 * 24 let today = new Date(in
Read More
posted @ 2020-12-04 13:58 秃头的铲屎官
Views(568)
Comments(0)
Diggs(0)
2020年11月23日
启动项目时,报 image-webpack-loader 错误
在新的电脑上拉取了项目,npm install 后,启动项目报 image-webpack-loader 错误, 几经折腾后,发现是npm 的问题。。。再次记录一下。。。 首先 把原先的删了 npm uninstall image-webpack-loader 然后用 cnpm install im
Read More
posted @ 2020-11-23 13:47 秃头的铲屎官
Views(1991)
Comments(0)
Diggs(0)
2020年11月21日
git合并分支时出现“Please enter a commit message to explain why this merge is necessary”报错的解决方法
有的时候我们在进行项目分支合并 git merge 时会出现如下错误 莫方~可以按照以下步骤来解决: 按键盘上的“i”键可进入插入模式 这时可以修改最上方的黄色部分,改成你想写的合并原因 按键盘上的“Esc”键退出插入模式 最后在最下面输入“ :wq ”后按回车键即可
Read More
posted @ 2020-11-21 16:42 秃头的铲屎官
Views(2484)
Comments(0)
Diggs(0)
2020年10月23日
vue 路由采用了history模式,为了避免页面跳转刷新空白的问题,服务端的配置
前端的相关要点配置(这个根据实际情况做相应调整) 1、vue.config.js 中的 配置: 1 const webpack = require("webpack"); 2 module.exports = { 3 assetsDir: './', 4 publicPath: '/', 5 out
Read More
posted @ 2020-10-23 18:08 秃头的铲屎官
Views(3656)
Comments(0)
Diggs(0)
vue项目中使用axios时的请求拦截和封装
1、在src下创建目录utils,在utils下新建文件request.js 1 //request.js 2 3 import axios from 'axios'; 4 import { Message,Loading } from 'element-ui'; 5 const service =
Read More
posted @ 2020-10-23 17:13 秃头的铲屎官
Views(483)
Comments(0)
Diggs(0)
vue 使用mescroll.js框架 实现下拉加载和上拉刷新功能
以下是代码是在项目中抽取出来的,都是实现下拉刷新上拉加载的要点。 注:以下不是用vue-cli写的,用vue-cli的请绕过,抱歉~ 1、mescroll 的页面的初始化 1 initMescroll(){ 2 var _this = this; 3 this.mescroll = new MeSc
Read More
posted @ 2020-10-23 10:24 秃头的铲屎官
Views(952)
Comments(3)
Diggs(0)
2020年7月15日
js sort方法根据数组中对象的某一个属性值进行排序
//sort方法接收一个函数作为参数,这里嵌套一层函数用来接收对象属性名,其他部分代码与正常使用sort方法相同. var arr = [ {name:'zopp',age:0}, {name:'gpp',age:18}, {name:'yjj',age:8} ]; function compare
Read More
posted @ 2020-07-15 09:03 秃头的铲屎官
Views(635)
Comments(0)
Diggs(0)
2020年6月18日
VUE 结合 router 实现全局拦截,验证用户是否登录,没有登录的话,跳到登录界面
1、在 router.js 里面 添加 路由拦截内容: router.beforeEach((to,from,next)=>{ if(to.path '/login'){ next(); }else { let token = localStorage.getItem('userInfo'); if
Read More
posted @ 2020-06-18 14:11 秃头的铲屎官
Views(1012)
Comments(0)
Diggs(0)
2020年6月9日
更换代码 git 的提交地址
如果你的代码已经由Git跟踪,然后设置这个仓库作为你的“origin”推送。 cd existing-project git remote set-url origin 仓库地址 git push -u origin --all git push origin --tags
Read More
posted @ 2020-06-09 09:45 秃头的铲屎官
Views(1101)
Comments(0)
Diggs(0)
2020年6月8日
VUE 监听 对象属性值变化的三种方式
示例: 监听一下对象 formCode 中 属性 application 的变化: <script> export default{ data(){ return{ formCode:{ application:"", oldcode:"", newcode:"" } } } } </script>
Read More
posted @ 2020-06-08 13:50 秃头的铲屎官
Views(9587)
Comments(0)
Diggs(0)
上一页
1
···
4
5
6
7
8
9
10
11
下一页
公告