File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export interface Options {
13
13
export interface RenderParams {
14
14
props ?: any
15
15
i18n ?: I18n
16
+ components ?: Record < string , Component >
16
17
}
17
18
18
19
async function useI18n ( app : App , params ?: RenderParams | null ) {
@@ -71,6 +72,11 @@ export async function useRender(
71
72
const doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
72
73
const app = createApp ( { render : ( ) => h ( component ) } , params ?. props )
73
74
75
+ if ( params ?. components ) {
76
+ for ( const [ name , component ] of Object . entries ( params . components ) )
77
+ app . component ( name , component )
78
+ }
79
+
74
80
app . config . globalProperties . $vueEmail = config
75
81
76
82
await useI18n ( app , params )
You can’t perform that action at this time.
0 commit comments