1. 创建vue项目
node版本需18以上 不然报错
npm init vue@latest
2. 项目配置
- 配置项目的icon
- 配置项目的标题
- 配置jsconfig.json
3. 项目目录结构划分
4.css样式的重置
npm install normalize.css
reset.css
html {
line-height: 1.2;
}
body,
h1,
h2,
h3,
h4,
ul,
li {
padding: 0;
margin: 0;
}
ul,
li {
list-style: none;
}
a {
text-decoration: none;
color: #333;
}
img {
vertical-align: top;
}
5.路由配置
6 备注
安装 pnpm,提升依赖的安装速度
npm config set registry https://registry.npmmirror.com
npm install -g pnpm
安装依赖
pnpm install
启动服务
npm run dev