File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -531,6 +531,14 @@ class CodeInjector implements ICodeInjector {
531531 }
532532 }
533533
534+ if ( this . adminforth . config . componentsToExplicitRegister ) {
535+ this . adminforth . config . componentsToExplicitRegister . forEach ( ( component ) => {
536+ if ( ! customResourceComponents . includes ( component ) ) {
537+ customResourceComponents . push ( component . file ) ;
538+ }
539+ } ) ;
540+ }
541+
534542 customResourceComponents . forEach ( ( filePath ) => {
535543 const componentName = getComponentNameFromPath ( filePath ) ;
536544 this . allComponentNames [ filePath ] = componentName ;
Original file line number Diff line number Diff line change @@ -1583,6 +1583,24 @@ export interface AdminForthInputConfig {
15831583 *
15841584 */
15851585 baseUrl ?: string ,
1586+
1587+
1588+ /**
1589+ * Most of components are explicitely registered in AdminForth e.g. when you are using them in renderers, page injections and so on.
1590+ * But some times you might want to have some components registered globally Explicitly. E.g. for ussage in other components without import.
1591+ *
1592+ * ```ts
1593+ * componentsToExplicitRegister: [
1594+ * {
1595+ * file: '@@/my-component.vue',
1596+ * meta: {
1597+ * some: 'meta'
1598+ * }
1599+ * }
1600+ * ```
1601+ *
1602+ */
1603+ componentsToExplicitRegister ?: AdminForthComponentDeclarationFull [ ]
15861604
15871605}
15881606
You can’t perform that action at this time.
0 commit comments