feat(web): 集成 Element Plus 组件库

- 在项目中添加 Element Plus 依赖
- 在 main.js 中注册 Element Plus
- 移除 App.vue 中的多余代码
- 更新 App.vue 模板,使用 RouterView
This commit is contained in:
2025-04-24 16:31:25 +08:00
parent 786a58c261
commit 0a5485ec89
4 changed files with 243 additions and 20 deletions

View File

@@ -1,22 +1,8 @@
<script setup>
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
import { RouterView } from 'vue-router';
</script>
<template>
<header>
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
<div class="wrapper">
<HelloWorld msg="You did it!" />
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
</div>
</header>
<RouterView />
</template>
@@ -26,11 +12,6 @@ header {
max-height: 100vh;
}
.logo {
display: block;
margin: 0 auto 2rem;
}
nav {
width: 100%;
font-size: 12px;