File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,17 @@ export class VueView extends DOMWidgetView {
27
27
28
28
render ( ) {
29
29
super . render ( ) ;
30
- this . displayed . then ( ( ) => {
30
+ ( async ( ) => {
31
+ const br = this . beforeViewRender ( ) ;
32
+ await this . displayed ;
33
+ await br ;
34
+
31
35
this . vueApp = Vue . createApp ( {
32
36
provide : {
33
37
viewCtx : createViewContext ( this ) ,
34
38
} ,
35
39
setup : ( ) => {
40
+ this . onSetup ( ) ;
36
41
return ( ) => vueRender ( this . model , this , { } ) ;
37
42
}
38
43
} ) ;
@@ -41,9 +46,16 @@ export class VueView extends DOMWidgetView {
41
46
this . vueApp . component ( 'jupyter-widget' , jupyterWidgetComponent ( ) )
42
47
this . addPlugins ( this . vueApp ) ;
43
48
this . vueApp . mount ( this . el ) ;
44
- } ) ;
49
+ } ) ( )
50
+
45
51
}
46
52
47
53
addPlugins ( vueApp ) {
48
54
}
55
+
56
+ onSetup ( ) {
57
+ }
58
+
59
+ async beforeViewRender ( ) {
60
+ }
49
61
}
You can’t perform that action at this time.
0 commit comments