Code template-vue3 simply introduces and uses elementPlus

Article Directory


First npm install

npm install element-plus

Then initialize in the main.js of the vue3 project

import ElementPlus from 'element-plus' // 引入
import "element-plus/dist/index.css" // 引入样式

const app = createApp(App)
app.use(ElementPlus) // 使用
app.mount('#app')

Finally, use elmentPlus in the template of a certain component in the views folder (here is the place where the component is specially stored)

<template>
  <div>
    <el-button>首页</el-button>
  </div>
</template>

Guess you like

Origin blog.csdn.net/abcnull/article/details/130584115