美文网首页
Vue3_31(UI库ElementUI,AntDesigin)

Vue3_31(UI库ElementUI,AntDesigin)

作者: BingJS | 来源:发表于2023-01-27 15:48 被阅读0次

    Element UI Plus

    安装方法

    # NPM
    $ npm install element-plus --save
     
    # Yarn
    $ yarn add element-plus
     
    # pnpm
    $ pnpm install 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插件支持

    {
      "compilerOptions": {
        // ...
        "types": ["element-plus/global"]
      }
    }
    

    Ant Design Vue

    安装

    $ npm install ant-design-vue@next --save
    $ yarn add ant-design-vue@next
    

    main.ts引入

    import { createApp } from 'vue';
    import Antd from 'ant-design-vue';
    import App from './App';
    import 'ant-design-vue/dist/antd.css';
     
    const app = createApp(App);
     
    app.use(Antd).mount('#app');
    

    相关文章

      网友评论

          本文标题:Vue3_31(UI库ElementUI,AntDesigin)

          本文链接:https://www.haomeiwen.com/subject/atbyjrtx.html