Skip to content

Commit 77f5fcc

Browse files
feat: add more extension points to VueView
1 parent fec057b commit 77f5fcc

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

js/src/VueView.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@ export class VueView extends DOMWidgetView {
2727

2828
render() {
2929
super.render();
30-
this.displayed.then(() => {
30+
(async () => {
31+
const br = this.beforeViewRender();
32+
await this.displayed;
33+
await br;
34+
3135
this.vueApp = Vue.createApp({
3236
provide: {
3337
viewCtx: createViewContext(this),
3438
},
3539
setup: () => {
40+
this.onSetup();
3641
return () => vueRender(this.model, this, {});
3742
}
3843
});
@@ -41,9 +46,16 @@ export class VueView extends DOMWidgetView {
4146
this.vueApp.component('jupyter-widget', jupyterWidgetComponent())
4247
this.addPlugins(this.vueApp);
4348
this.vueApp.mount(this.el);
44-
});
49+
})()
50+
4551
}
4652

4753
addPlugins(vueApp) {
4854
}
55+
56+
onSetup() {
57+
}
58+
59+
async beforeViewRender() {
60+
}
4961
}

0 commit comments

Comments
 (0)