首页 > 其他分享 >按需引入Ant Design Vue

按需引入Ant Design Vue

时间:2022-11-16 15:58:11浏览次数:46  
标签:ant Vue SearchOutlined Ant vue design install import Design

  1.   配置
    {
      "plugins": [
        ["import", { "libraryName": "ant-design-vue", "libraryDirectory": "es", "style": "css" }] // `style: true` 会加载 less 文件
      ]
    }

     

  2. 安装插件   
    npm install babel-plugin-import -D
    
    npm install ant-design-vue --save

    npm install --save @ant-design/icons-vue

     

  3. 引入插件
    import { Button } from "ant-design-vue";
    import { SearchOutlined } from "@ant-design/icons-vue";
    export default {
      install(App) {
        App.use(Button);
        App.component("SearchOutlined", SearchOutlined);
      },
    };

     

标签:ant,Vue,SearchOutlined,Ant,vue,design,install,import,Design
From: https://www.cnblogs.com/czwhandsome/p/16896162.html

相关文章