![](https://img-blog.csdnimg.cn/20190918135101160.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
vite
文章平均质量分 92
vite+vue3
皮蛋很白
没有什么难点是一觉醒来解决不了的
展开
-
Vue3+Vite+Ts 项目实战 07 打包构建部署
打包构建构建生产版本 | Vite 官方中文文档打包# 打包构建npm run build# 预览 测试构建结果是否可以用npm run preview# 访问 http://localhost:4173由于 domain 跨域,cookie 无法携带,后端无法通过 cookie 获取登录验证码。可以从 npm run dev 中登录将浏览器缓存的 USER 拷贝到 http://localhost:4173 跳过登录,查看页面内容。TS 检查报错当前使用的 element-pl原创 2022-04-20 16:08:32 · 5550 阅读 · 0 评论 -
Vue3+Vite+Ts 项目实战 06 自动注册全局组件、封装分页和 Dialog 组件、权限管理
创建全局组件页面容器组件<!-- src\components\PageContainer\index.vue --><template> <el-space alignment="flex-start" class="content-space" direction="vertical" prefix-cls="content-space" size="large" > <slot /> &l原创 2022-04-20 16:07:51 · 3869 阅读 · 2 评论 -
Vue3+Vite+Ts 项目实战 05 用户登录和身份认证
用户登录页面添加登录接口// src\api\common.ts// 公共基础接口封装import request from '@/utils/request'import { DemoData, LoginResponse } from '@/api/types/common'export const demo = () => { return request<DemoData>({ method: 'GET', url: '/demo' })}原创 2022-04-20 16:05:56 · 6177 阅读 · 1 评论 -
Vue3+Vite+Ts 项目实战 04 搭建 Layout 布局
Layout 布局容器<!-- src\layout\AppLayout.vue --><template> <el-container> <el-aside width="200px"> Aside </el-aside> <el-container> <el-header>Header</el-header> <el-main>原创 2022-04-20 16:05:08 · 7339 阅读 · 2 评论 -
Vue3+Vite+Ts 项目实战 03 初始化 Element Plus、API 和组件自动导入、ElMessage 组件使用、Vue 全局属性、Axios、环境变量、跨域
配置 Vue RouterVite 创建的项目没有集成 Vue Router,需要手动安装集成。Vue 3 使用最新版本的 Vue Router v4.x。# 安装npm install vue-router@4创建路由配置文件:<!-- src\views\home\index.vue --><template> <div> 首页 </div></template><script setup lang=原创 2022-04-20 16:07:04 · 10008 阅读 · 2 评论 -
Vue3+Vite+Ts 项目实战 02 配置 VueRouter、Pinia 配置和简单介绍、配置 SCSS
配置 Vue RouterVite 创建的项目没有集成 Vue Router,需要手动安装集成。Vue 3 使用最新版本的 Vue Router v4.x。# 安装npm install vue-router@4创建路由配置文件:<!-- src\views\home\index.vue --><template> <div> 首页 </div></template><script setup lang=原创 2022-04-20 16:01:28 · 3609 阅读 · 0 评论 -
Vue3+Vite+Ts 项目实战 01 Vite 创建项目、ESLint+TS+GitCommit配置、Vue3新特性介绍
前置声明:Vue3 和 Vite 还在持续更新,中文文档仍未全部完善,该笔记的内容在未来可能过时,建议多参考英文文档,使用最新版本。本案例使用的后端 API 服务,基于 Express 搭建,使用 json 文件管理数据,Git 仓库和使用文档。本案例旨在学习 Vite 和 Vue3 搭建配置应用,并没有开发完整的业务功能。项目初始化使用 Vite 创建项目Vite 官方中文文档 (vitejs.dev)官方声明:Vite 需要 Node.js 版本 >= 12.0.0。然而,.原创 2022-04-20 15:56:53 · 6985 阅读 · 4 评论