[Vuejs]-Style element-plus component in vue 3

0👍

you need import css style

import 'element-ui/lib/theme-chalk/index.css';

0👍

In my main.ts

import { createApp } from 'vue'
import App from '@/App.vue'
import router from '@/router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import "./app.css";

const app = createApp(App)

app.use(ElementPlus)
app.use(router)
app.mount('#app')

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

export default app;

My el-date-picker
enter image description here

Leave a comment