一直很喜歡ant-design-vue這一套ui,在使用過成中遇到一些問題。javascript
ant-design-vue文檔:https://vue.ant.design/docs/vue/use-with-vue-cli-cn/vue
在官方文檔中若是要vue/cli3若是要按組件加載,需安裝babel-plugin-import並將babel.config.js配置成以下即可java
module.exports = { presets: ['@vue/app'], plugins: [ [ "import", { libraryName: "ant-design-vue", libraryDirectory: "es", style: true } ] ] }
在實際操做中發現,在如上操做後,並不能成功;還需引入 "less","less-loader" 兩個js庫;而且還需在node_modules\less-loader\dist\index.js文件中添加一句jsnode
options.javascriptEnabled = true