07 2021 档案
摘要:未懒加载的路由 import Rou from '@/views/rou.vue' const router = new VueRouter({ routes: [ { path: '/rou', component: Rou } ] }) 懒加载 方案一: const Rou = () => im
阅读全文
摘要: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 '.
阅读全文
摘要:在router中加入 const originalPush = VueRouter.prototype.push VueRouter.prototype.push = function push (location) { return originalPush.call(this, location
阅读全文
摘要:发送请求 request({ method: "GET", // 请求方式 url: "url地址", // 请求url responseType:'arraybuffer', // 一定要写 data: data // 参数 }) 发送请求拿到返回数据后转换base64格式 .then(res =
阅读全文

浙公网安备 33010602011771号