安装node.js
查看镜像同时修改它的镜像(阿里云加速)
阅读一手文档,vue.js官方文档
sb的s(two core features of vue)
Don't worry
参考官方文档创建项目
快速体验,修改about页面的内容,浏览器看变化
清理垃圾
翻垃圾桶,捡回来一些东西
添置新物品
node -v
npm -v
npm config get registry
npm config set registry https://registry.npmmirror.com
npm create vue@latest
cd 项目名称
进入项目目录nmp install
安装依赖nmp run dev
启动开发服务器src/views/AboutView.vue
<template>
<div class="about">
<h1>这是我的个人介绍页面</h1>
</div>
</template>
<style scoped>
.about {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
</style>
src/views/
下创建NoteView.vue
// 在router/index.js中添加
{
path: '/note',
name: 'note',
component: () => import('../views/NoteView.vue')
}
<!-- 在App.vue中添加 -->
<RouterLink to="/note">笔记</RouterLink>
<!-- 为了让导航之间有间隔可添加以下代码 -->
<style scoped>
nav a {
display: inline-block;
padding: 0 1rem;
border-left: 1px solid var(--color-border);
}
</style>
npm cache clean --force
npm install
npm update