mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-01-23 01:30:23 +08:00
fix: direct import for antdv subcomponents supported
修复直接import部分antdv子组件时会在build过程中报错的问题
This commit is contained in:
parent
853bde9275
commit
8b00112d5a
@ -19,6 +19,7 @@
|
||||
- **其它**
|
||||
- 修复多标签在某些情况下关闭页签不会跳转路由的问题
|
||||
- 修复部分组件可能会造成热更新异常的问题
|
||||
- 修复直接`import`部分`antdv`子组件时会在 build 过程中报错的问题,如:TabPane、RadioGroup
|
||||
|
||||
## 2.7.2(2021-09-14)
|
||||
|
||||
|
@ -14,7 +14,52 @@ export function configStyleImportPlugin(isBuild: boolean) {
|
||||
libraryName: 'ant-design-vue',
|
||||
esModule: true,
|
||||
resolveStyle: (name) => {
|
||||
return `ant-design-vue/es/${name}/style/index`;
|
||||
// 这里是“子组件”列表,无需额外引入样式文件
|
||||
const ignoreList = [
|
||||
'typography-text',
|
||||
'typography-title',
|
||||
'typography-paragraph',
|
||||
'typography-link',
|
||||
'anchor-link',
|
||||
'sub-menu',
|
||||
'menu-item',
|
||||
'menu-item-group',
|
||||
'dropdown-button',
|
||||
'breadcrumb-item',
|
||||
'breadcrumb-separator',
|
||||
'input-password',
|
||||
'input-search',
|
||||
'input-group',
|
||||
'form-item',
|
||||
'radio-group',
|
||||
'checkbox-group',
|
||||
'layout-sider',
|
||||
'layout-content',
|
||||
'layout-footer',
|
||||
'layout-header',
|
||||
'step',
|
||||
'select-option',
|
||||
'select-opt-group',
|
||||
'card-grid',
|
||||
'card-meta',
|
||||
'collapse-panel',
|
||||
'descriptions-item',
|
||||
'list-item',
|
||||
'list-item-meta',
|
||||
'table-column',
|
||||
'table-column-group',
|
||||
'tab-pane',
|
||||
'tab-content',
|
||||
'timeline-item',
|
||||
'tree-node',
|
||||
'skeleton-input',
|
||||
'skeleton-avatar',
|
||||
'skeleton-title',
|
||||
'skeleton-paragraph',
|
||||
'skeleton-image',
|
||||
'skeleton-button',
|
||||
];
|
||||
return ignoreList.includes(name) ? '' : `ant-design-vue/es/${name}/style/index`;
|
||||
},
|
||||
},
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user