const anyComponentYouLike = { name: "any-component", template: "

Your template here - or in a Vue SFC.

" }; //...elsewhere const id = anyComponentYouLike.name; this.$store.dispatch("pluginNamespace/open", id);
const window2 = { $state: {id: "w2", title: "Window 2", header: "different-header", className: "andAnotherClass"}, name: "demo-window-2", props: ["window", "funcs"], template: ` Access available properties such as - window.title, window.x, window.minimized, etc. - funcs.close(), funcs.toggleMin(), etc. ` }; const window3 = { $state: {header: ""}, name: "demo-window-3", template: "Anything goes!" }; this.$store.open("pluginNamespace/open", {id: "windowId", context: anyData}); //...elsewhere const windowX = { name: "demo-window-x", props: ["window", "funcs"], template: ` <div> <p>Some dynamic shenanigans:</p> <component :is="window.context.xid" :data="window.context.data" /> </div>` };