element-plus

116 阅读1分钟

element-plus

依赖

直接看这这里 初始化

开始-引入

// main.ts
import { createApp } from 'vue'
import ElementPlus from 'element-plus'//这里
import 'element-plus/dist/index.css'//这里
import App from './App.vue'

const app = createApp(App)

app.use(ElementPlus)//这里
app.mount('#app')

Volar支持 - 标签补全

// tsconfig.json
{
  "files": [],
  "references": [
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.node.json"
    }
  ],
  "compilerOptions": {//这里
    "types": [//这里
      "element-plus/global"
    ]
  }
}

直接开始使用