fix(icon): fix the warning of not export default at webpack5 (#4579)

pull/4597/head
BeADre 2021-08-27 10:04:33 +08:00 committed by GitHub
parent 74133d18af
commit 7b317a2765
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -19,9 +19,11 @@ import Base from '../base';
// Initial setting
// https://github.com/vueComponent/ant-design-vue/issues/2745
let validIcons = allIcons.default || allIcons;
VueIcon.add(...Object.keys(validIcons).map(key => validIcons[key]));
VueIcon.add(
...Object.keys(allIcons)
.filter(key => key !== 'default')
.map(key => allIcons[key]),
);
setTwoToneColor('#1890ff');
const defaultTheme = 'outlined';
let dangerousTheme;