07 2021 档案

摘要:未懒加载的路由 import Rou from '@/views/rou.vue' const router = new VueRouter({ routes: [ { path: '/rou', component: Rou } ] }) 懒加载 方案一: const Rou = () => im 阅读全文
posted @ 2021-07-26 09:32 我的世界蹦擦擦 阅读(86) 评论(0) 推荐(0)
摘要:main.ts import axios from '@/api/index.ts' Vue.prototype.$axios = axios; 在src根目录下新建ts文件 vue-prototype.d.ts import Vue from 'vue'; import axios from '. 阅读全文
posted @ 2021-07-19 14:38 我的世界蹦擦擦 阅读(163) 评论(0) 推荐(0)
摘要:在router中加入 const originalPush = VueRouter.prototype.push VueRouter.prototype.push = function push (location) { return originalPush.call(this, location 阅读全文
posted @ 2021-07-12 10:14 我的世界蹦擦擦 阅读(50) 评论(0) 推荐(0)
摘要:发送请求 request({ method: "GET", // 请求方式 url: "url地址", // 请求url responseType:'arraybuffer', // 一定要写 data: data // 参数 }) 发送请求拿到返回数据后转换base64格式 .then(res = 阅读全文
posted @ 2021-07-02 12:56 我的世界蹦擦擦 阅读(1476) 评论(0) 推荐(0)