mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 19:29:04 +08:00
fix: hmr multiple registered components
This commit is contained in:
@@ -5,8 +5,13 @@ import { Button as AntButton } from 'ant-design-vue';
|
||||
import { getApp } from '/@/useApp';
|
||||
|
||||
const compList = [Icon, BasicHelp, BasicTitle, Button, AntButton.Group];
|
||||
|
||||
// Fix hmr multiple registered components
|
||||
let registered = false;
|
||||
export function registerGlobComp() {
|
||||
if (registered) return;
|
||||
compList.forEach((comp: any) => {
|
||||
getApp().component(comp.name, comp);
|
||||
});
|
||||
registered = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user