Skip to content

标签:Vue3 篇

Vue3 封装 Axios

前端

在 main.ts 引入 axios 配置 axios 默认地址 声明 axios 类型 导入getCurrentInstance 与 ComponentInternalInstance 解构赋值出 proxy 通过 proxy 访问 $h

2022-05-07
Vue

Vue Router 快速上手

前端

创建路由文件:在 /src/route 下创建 index.js 路由文件 声明路由占位符:`` 导入路由:在 index.js 中导入 路由文件 声明嵌套路由: 在路由文件中配置children属性: 定义:指Hash地址中可变的部分定义

2022-04-16
Vue

Vite 项目升级到 TypeScript

前端

npm install -D typescript 将 main.js 重命名为 main.ts 将 index.html 中引入的 main.js 改为 main.ts 将 ` 标签修改为 ` 导入 defineComponent 在 .

2022-03-16
Vue
关注微信公众号