🔄Update: 导入 Element-plus

This commit is contained in:
2025-11-18 19:18:04 +08:00
parent aa41e6345c
commit b5575b1ba6
2 changed files with 11 additions and 1 deletions
+8
View File
@@ -1,4 +1,7 @@
<template>
<div>
<el-button>I am ElButton</el-button>
</div>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
@@ -31,10 +34,15 @@
</template>
<script>
import { ElButton } from 'element-plus';
export default {
name: 'HelloWorld',
props: {
msg: String
},
components: {
ElButton
}
}
</script>
+3 -1
View File
@@ -1,5 +1,7 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
createApp(App).use(router).mount('#app')
createApp(App).use(router).use(ElementPlus).mount('#app')