摘要:使用npm创建vite项目 1:npm create vite 2:输入项目名称,例如我的项目名称为:whipip 3:选择你要创建项目的类型,我要创建vue项目,就选择Vue 4:选择你要使用的脚本语言 5,即创建完毕 6:安装相关依赖 npm i 7:运行项目:npm run dev 8:查看项
阅读全文
摘要:1:设置vue项目运行后,自行打开浏览器 找到package.json配置文件 2:src起别名,这样就可以直接找到文件路径,不需要../../的这些繁琐操作。意思直接使用@符号就代表src目录 1):在vite.config.ts修改 import { defineConfig } from 'v
阅读全文
摘要:1:引入reset.scss /** * ENGINE * v0.2 | 20150615 * License: none (public domain) */ *, *:after, *:before { box-sizing: border-box; outline: none; } html,
阅读全文
摘要:1:在main.ts 2:在App.vue中直接使用
阅读全文
摘要:1:安装路由,npm i vue-router 2:创建router文件夹,然后再下面创建index.ts //首先需要引入createRouter,进行创建路由 import {createRouter, createWebHistory} from "vue-router"; //createR
阅读全文
摘要:1:安装 npm install element-plus 2:使用element_plus,并让其汉化 3:引入element_plus的icon npm install @element-plus/icons-vue 4:样式的深度选择器 //深度选择器 >>>(原生的css) /deep/ :
阅读全文