element-plus.ts 391 B

1234567891011
  1. import { defineNuxtPlugin } from '#app'
  2. import 'element-plus/dist/index.full'
  3. import ElementPlus from 'element-plus'
  4. import * as ElementPlusIconsVue from '@element-plus/icons-vue'
  5. export default defineNuxtPlugin(nuxtApp => {
  6. nuxtApp.vueApp.use(ElementPlus)
  7. for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  8. nuxtApp.vueApp.component(key, component)
  9. }
  10. })