logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

vue中使用element-ui组件中的el-button时,@click事件点击无效

1.使用element-ui组件中的el-button时,@click点击无效2.在@click后面加上 .native即可【@click.native】

vue中使用element组件的Layout布局和Button按钮实现分页

1.安装elementUI:npm i element-ui -S2.引入elementUI组件(main.js文件中)import Element from 'element-ui'import 'element-ui/lib/theme-chalk/index.css'Vue.use(Element, { size: 'small' })3.访问Element官网【组件–Layo...

vue中npm run dev 报错(eslint规则)

1.报错了。。。You may use special comments to disable some warnings.Use // eslint-disable-next-line to ignore the next line.Use /* eslint-disable */ to ignore all warnings in a file.2.在build/webpack.bas...

vue中使用element组件的Layout布局和Button按钮实现分页

1.安装elementUI:npm i element-ui -S2.引入elementUI组件(main.js文件中)import Element from 'element-ui'import 'element-ui/lib/theme-chalk/index.css'Vue.use(Element, { size: 'small' })3.访问Element官网【组件–Layo...

vue+axios登录时获取token和userId

1.登录成功后,存储后台返回的token值和userIdPS:把username和password,post请求发送到后台,若username和password正确,后台返回token和userId。若本地存储有token,localStorage.getItem(‘token’),则路由跳转到index页面,否则跳转到login;若username和password有其一错误,则登录不成功...

vue中刷新页面定位导航栏(解决刷新页面导航栏自动定位到首页的问题+路由传参)

1.页面刷新时,判断URL地址与左边导航栏定位是否相符PS1:window.location.hash返回从井号#开始的地址,例如http://aaa.com/#/action/aboutUs,window.location.hash获取的是#/action/aboutUsPS2:Location对象属性2.刷新页面,定位到相当于的导航栏...

vue的路由拦截器

1.index.js文件PS:route,是一条路由;routes 是一组路由;router 是一个机制,相当于一个管理者,它来管理路由import Vue from 'vue';import Router from 'vue-router';// 要告诉 vue 使用 RouterVue.use(Router)// route是一个对象,多个route组成一个routescon...

vue中的导航栏动态添加class(三目运算符)

1.三目运算符,:class=" isActive==‘aaa’ ? ‘isActive’ : ‘’ ",@click=“toggle(‘aaa’)”。判断isActive是否等于aaa,等于 -> class=“isActive”,不等 -&a

vue中使用elementUI组件的Upload 上传图片

1.访问Element官网【组件–Upload上传】<el-uploadaction="https://jsonplaceholder.typicode.com/posts/"list-type=&

vue中axios拦截器的使用

1.拦截器分为request请求拦截器和response响应拦截器PS:request请求拦截器:发送请求前统一处理,如:设置请求头headers、应用的版本号、终端类型等。response响应拦截器:有时候我们要根据响应的状态码来进行下一步操作,例如:由于当前的token过期,接口返回401未授权,那我们就要进行重新登录的操作。2.main.js文件中(先安装axios)import ...

    共 13 条
  • 1
  • 2
  • 请选择