欢迎来到码农权的博客 MaNongGeGe.|

08 2022 档案

vue动态修改标题
摘要:vue动态修改标题 document.title // 笨方法 create() { document.title = 'xxx'; } // 推荐写法(Vue-Router的beforeEach拦截) ```js // router.js { name: "xxx", path: "xxx", c
147
0
0
vue路由拦截器
摘要:vue路由拦截器 有三种路由拦截器:全局的,针对单个路由的,针对单个组件的 1.全局的路由拦截器 写在router下的index.js的export default router 之前的代码。 前置拦截器: router.beforeEach((to, from)=> { //from中包含跳转前的
2413
0
0
路由跳转的方式和传参——方式之声明式导航、编程式导航 & 传参之params和query
摘要:路由跳转的方式和传参——方式之声明式导航、编程式导航 & 传参之params和query 1. 路由跳转的2种方式 第一种:声明式导航 router-link(必须要有to属性),可以实现路由的跳转 2. 编程式导航 利用的是组件实例的$router.push|replace方法,可以实现路由的跳转
176
0
0
vue 使用 vue-wechat-title 动态设置 title
摘要:vue 使用 vue-wechat-title 动态设置 title // 1.安装 vue-wechat-title yarn add vue-wechat-title // 2.在main.js import VueWechatTitle from 'vue-wechat-title' Vue.
233
0
0
Vue路由传递参数与接受参数
摘要:路由(参数传递) 使用路径匹配的方式 修改路由配置 { path: '/xxx/xxx/:id', component: XXX } 主要是在 path 属性中增加了 :id 这样的占位符,来接受路由参数 例如 /xxx/xxx/66 ID={{$route.params.id}} 源组件 => 源
421
0
0
封装axios
摘要:// 封装axios import axios from "axios"; const http = axios.create({ baseURL: "http://localhost:3006/api", timeout: 5000 }) // 请求拦截 http.interceptors.req
45
0
0
跨域解决方案
摘要:目前主流的跨域解决方案有两种 1. 后台解决(cors) 2. 前台解决(proxy) // 在 vue.config.js 中添加配置 devServer: { proxy: { '/api': { target: '<url>', changeOrigin: true } } } // 跨域配置
42
0
0
在vue-cli中使用scss&组件样式被scope保护解决方案
摘要:在vue-cli中使用scss 安装 node-sass sass-loader,yarn add node-sass sass-loader --dev 在style标签中,添加lang属性,lang="scss" 最后在里面编写scss代码即可 组件样式被scope保护 组件样式被scope保护
182
0
0
pm2的基本使用
摘要:Pm2 安装与使用 PM2 是一个带有负载均衡功能的 Node 应用进程管理器。 全局安装:yarn global add pm2 查看版本:pm2 -v 启动:pm2 start app.js 还可以通过 pm2 start app.js --name (Appname)在列表Appname起一个
131
0
0
JavaIO目录操作
摘要:JavaIO目录操作
12
0
0
JavaIO文件信息
摘要:JavaIO文件信息
10
0
0
JavaIO创建文件
摘要:创建文件
39
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起
  1. 1 不将就 码农权
  2. 2 Bleeding Love 码农权
  3. 3 想你念你 码农权
Bleeding Love - 码农权
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.

Not available