vue
vue中遇到的问题及自己觉得重要的地方
香菜xc
这个作者很懒,什么都没留下…
展开
-
被选择过的行回显在表格
被选择过的行回显在表格。原创 2022-09-01 16:42:01 · 183 阅读 · 1 评论 -
methods获取不到vuex内容
methods获取不到vuex内容。原创 2022-08-09 16:35:09 · 272 阅读 · 0 评论 -
记录elementui表格中的row-style使用
row-style属性绑定的值需定义在methods,不可定义在computed,否则无法获取row的值原创 2022-06-07 09:03:43 · 2068 阅读 · 0 评论 -
管理员登录及token相关
1、前端登录表单部分 <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" status-icon > <el-form-item prop="userName">原创 2022-04-21 11:01:10 · 1463 阅读 · 0 评论 -
请求拦截、响应拦截和请求处理
1、创建axios实例const http = axios.create({ // baseURL: 'http://localhost:8085/', timeout: 1000 * 30, // 请求超时 withCredentials: true, // true:在跨域请求时,会携带用户凭证 false:在跨域请求时,不会携带用户凭证;返回的 response 里也会忽略 cookie headers: { 'Content-Type': 'application/j原创 2022-04-16 22:05:39 · 4113 阅读 · 0 评论 -
动态获取菜单和路由及路由守卫
1、组件注册// 开发环境不使用懒加载, 因为懒加载页面太多的话会造成webpack热更新太慢, 所以只有生产环境使用懒加载// const _import = require('./import-' + process.env.NODE_ENV)// 生产环境的为 file => () => import('@/views/' + file + '.vue')const _import = file => require('@/views/' + file + '.vue'.原创 2022-04-16 21:31:27 · 2286 阅读 · 3 评论 -
验证码的获取与验证
前端vue部分:/** * 获取uuid */export function getUUID () { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => { return (c === 'x' ? (Math.random() * 16 | 0) : ('r&0x3' | '0x8')).toString(16) })}根据生成的uuid从后端获取验证码 crea原创 2022-04-15 15:15:18 · 7054 阅读 · 0 评论