Select to view content in your preferred language

How can I use a custom Vue widget in the Expand widget?

1143
2
Jump to solution
03-01-2021 09:58 AM
MattStayner
Frequent Contributor

I want to build a custom widget built with Vue and show it in the Expand widget.

For example, how would modify this example to show the camera-info Vue component inside an Expand widget?

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Honored Contributor

You can do it a couple of ways. You can set the Expand content to the Vue target element or the Vue output element ".$el". Here is a demo.

https://codepen.io/odoe/pen/WNoJrWv?editors=1000

View solution in original post

0 Kudos
2 Replies
ReneRubalcava
Honored Contributor

You can do it a couple of ways. You can set the Expand content to the Vue target element or the Vue output element ".$el". Here is a demo.

https://codepen.io/odoe/pen/WNoJrWv?editors=1000

0 Kudos
MattStayner
Frequent Contributor

Perfect! Thanks for the quick response. I was just missing content: document.getElementById("info"). For others who may be interested, the following also works:

const expand = new Expand({
	view,
	content: info.$el
});
0 Kudos