vue在首页显示欢迎使用ERP管理系统
时间: 2023-12-31 15:03:18 浏览: 29
要在 Vue 的首页上显示欢迎使用 ERP 管理系统,你可以在 App.vue 文件中添加一个欢迎信息的组件。
首先,在 src 目录下创建一个 components 文件夹,在其中创建一个名为 Welcome.vue 的组件。
然后,在 App.vue 文件中引入 Welcome 组件,并在页面中使用它。
下面是具体的代码实现:
Welcome.vue:
```html
<template>
<div class="welcome">
<h1>欢迎使用 ERP 管理系统</h1>
</div>
</template>
<style>
.welcome {
text-align: center;
margin-top: 20px;
}
h1 {
font-size: 30px;
color: #333;
}
</style>
```
App.vue:
```html
<template>
<div id="app">
<Welcome />
<!-- 其他组件 -->
</div>
</template>
<script>
import Welcome from './components/Welcome.vue'
export default {
name: 'App',
components: {
Welcome
}
}
</script>
```
这样,在 Vue 的首页上就会显示一个欢迎信息,以提醒用户他们正在使用 ERP 管理系统。