![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
记录在vue学习过程中遇到的难点或重要的知识点
灰笑々
这个作者很懒,什么都没留下…
展开
-
post请求中的Content-Type
在POST请求中的 Content-Type 常见的有以下3种形式: application/json 请求体中的数据会以json字符串的形式发送到后端(axios默认) application/x-www-form-urlencoded 请求体中的数据会以普通表单形式(键值对)发送到后端 multipart/form-data 它会将请求体的数据处理为一条消息,以标签为单元,用分隔符分开。既可以上传键值对,也可以上传文件。 后端接受application/x-www-form-urlencoded 方转载 2021-09-17 14:28:37 · 791 阅读 · 0 评论 -
vue-router路由hash和history切换
history模式:在路由index.js文件中导入 createWebHistory import { createRouter, createWebHistory } from 'vue-router' import Home from '../views/Home.vue' const routes = [ { path: '/', name: 'Home', component: Home }, { path: '/about', name:转载 2021-09-10 14:20:20 · 696 阅读 · 0 评论