会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
恶魔笔记
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
16
下一页
2020年9月17日
全局过滤器,将时间戳处理成规定格式的年月日……
摘要: //全局过滤器 Vue.filter('dateFormat', function(originVal) { const dt = new Date(originVal) const y = dt.getFullYear() const m = (dt.getMonth() + 1 + '').pa
阅读全文
posted @ 2020-09-17 17:30 聂小恶
阅读(310)
评论(0)
推荐(0)
2020年8月14日
将本地子分支代码提交到主分支,并且将子分支保存到云端仓库
摘要: https://www.bilibili.com/video/BV1bE411p7As?p=29 视频教程 //创建本地user分支,并上传的云端 git branch 查看所有分支 git checkout -b user 新建分支user,并且切换到user分支上 git status 查看本地
阅读全文
posted @ 2020-08-14 11:30 聂小恶
阅读(496)
评论(0)
推荐(0)
2020年8月13日
vue添加用户校验(element-ui)
摘要: data() { var validatePass = (rule, value, callback) => { if (value '') { callback(new Error('请输入密码')) } else { if (this.form.checkPass !== '') { this.
阅读全文
posted @ 2020-08-13 16:53 聂小恶
阅读(1253)
评论(0)
推荐(0)
2020年8月12日
路由重定向和占位符
摘要: <el-main> <!-- 路由占位符 显示子路由内容 --> <router-view></router-view> </el-main> 路由设置: { path: '/home', component: Home, redirect: '/welcome', //重定向到子路由 childr
阅读全文
posted @ 2020-08-12 10:49 聂小恶
阅读(1981)
评论(0)
推荐(0)
2020年8月11日
axios请求拦截器添加token
摘要: 需求: 需要授权的API,必须在请求头中使用Authorization字段提供token令牌(登录接口不需要) 实现方法:(请求拦截器,预处理设置token) 在发送请求前,设置token,代码如下
阅读全文
posted @ 2020-08-11 17:34 聂小恶
阅读(1166)
评论(0)
推荐(0)
2020年8月10日
语法处理
摘要: //去除默认的字符串双引号,代码已封号结尾 新建 .prettierrc.json { "singleQuote": true, "semi": false } ok,以上变解决了哈 这里是相关知识 .eslintrc.js rules中设置规则: "off" 或 0 - 关闭这个规则检查 "war
阅读全文
posted @ 2020-08-10 18:26 聂小恶
阅读(129)
评论(0)
推荐(0)
vue退出登录(清除token)
摘要:
阅读全文
posted @ 2020-08-10 18:18 聂小恶
阅读(9858)
评论(0)
推荐(0)
vue路由导航守卫控制访问权限
摘要: import Vue from 'vue' import VueRouter from 'vue-router' import Login from '../components/Login.vue' import Home from '../components/Home.vue' Vue.use
阅读全文
posted @ 2020-08-10 18:07 聂小恶
阅读(946)
评论(0)
推荐(0)
2020年8月5日
请求后台配置 axios 使用
摘要: //请求后台配置 import axios from 'axios' axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/' Vue.prototype.$http = axios 发送请求(接口名:login,请求类型:po
阅读全文
posted @ 2020-08-05 10:15 聂小恶
阅读(329)
评论(0)
推荐(0)
2020年7月24日
div页面居中方法
摘要: #xx{ position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);} transform属性应用于元素的2D或3D转换,这个属性允许你将元素旋转,缩放,移动,倾斜等。 讲解:https://www.runoo
阅读全文
posted @ 2020-07-24 11:01 聂小恶
阅读(2281)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
16
下一页
公告