ant-design-vue 自定义主题

 

https://github.com/ant-design/ant-design/issues/8348 issues地址看到的

1、插件地址: https://github.com/yesmeck/webpack-less-theme-plugin

下载插件

npm i webpack-less-theme-plugin --save-dev

vue.config.js (vue-cli rc3.0)

const LessThemePlugin = require('webpack-less-theme-plugin');
module.exports = {
    configureWebpack:{
         plugins: [
               new LessThemePlugin({ theme: './daka-theme/scss/ant-less.less' }) //自己lessURL
          ]
   } 

}

.babelrc

{
    "plugins": [
    ["import", { "libraryName": "ant-design-vue", "libraryDirectory": "es", "style": true }]
    ]
}

antd-scss-theme-plugin 这个插件也可以

关注我

ant-design-vue 自定义主题_第1张图片

你可能感兴趣的:(vue)