VUE
shandong_chu
这个作者很懒,什么都没留下…
展开
-
【Vue学习总结】02-代理服务器
1、场景 在Vue的开发过程中会遇到前端页面和后端接口不在同一个服务器的情况, 那么这个时候就需要配置代理,这样前端页面可以通过代理访问后端接口 2、配置文件 在项目的/config/index.js中进行配置 3、配置内容 打开index.js文件,然后进行配置,具体如下: dev: { // Paths assetsSubDirectory: 'static',// 静态资源文件夹 assetsPublicPath...原创 2022-04-11 14:03:05 · 1643 阅读 · 0 评论 -
【Vue学习总结】01—Vue中的路由以及默认路由跳转
1、在/src/router的index.js文件中配置路由 import Vue from 'vue' import Router from 'vue-router' import HelloWorld from '@/components/HelloWorld' import second from '@/components/second' // 1、引入vue-router Vue.use(Router) // 2、定义路由,此处定义了2个路由 const routes = [ {pat原创 2021-09-08 17:18:19 · 1326 阅读 · 1 评论