diff --git a/plugin/vueSetupExtend.ts b/plugin/vueSetupExtend.ts index 3528679c..c5f3cd40 100644 --- a/plugin/vueSetupExtend.ts +++ b/plugin/vueSetupExtend.ts @@ -83,10 +83,10 @@ export function supportScript(code: string, options: ExtendOptions) { attrs.langImport = `{{${langImport}}}`; } } - if (options.setComponents) { + if (options.setComponents && !attrs.getComponents) { const components = getComponent(descriptor); if (components.length) { - attrs.components = `{{[${components}]}}`; + attrs.getComponents = `{{()=>[${components}]}}`; } } let scriptStr = ''; diff --git a/src/layout/components/header/components/topBar/components/right/index.vue b/src/layout/components/header/components/topBar/components/right/index.vue index 0744a1af..294186b9 100644 --- a/src/layout/components/header/components/topBar/components/right/index.vue +++ b/src/layout/components/header/components/topBar/components/right/index.vue @@ -11,9 +11,6 @@