vue elementui

安装

npm i -D element-plus 
npm i -D @element-plus/icons-vue

引入

// main.ts
import { createApp } from 'vue'

import App from './App.vue'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 如果您正在使用CDN引入,请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

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

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

Volar 智能提示支持

// tsconfig.app.json
{
  ...
  "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "node_modules/element-plus/global.d.ts"],
  ...
}

你可能感兴趣的:(vue_electron,vue.js,elementui,前端)