mirror of
https://github.com/nasa/openmct.git
synced 2024-12-28 08:58:52 +00:00
071a13b219
* [Imagery] Click on image to get a large view #3582 * Created new viewLargeAction. * Changes in view registry to add parent element property inside view object. * Separate class for views and added missing changes for LadTableSet. * Renamed callBack to onItemClicked. Co-authored-by: Andrew Henry <akhenry@gmail.com>
37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
import Vue from 'vue';
|
|
import HelloWorld from './HelloWorld.vue';
|
|
|
|
function SimpleVuePlugin() {
|
|
return function install(openmct) {
|
|
openmct.types.addType('hello-world', {
|
|
name: 'Hello World',
|
|
description: 'An introduction object',
|
|
creatable: true
|
|
});
|
|
openmct.objectViews.addProvider({
|
|
name: "demo-provider",
|
|
key: "hello-world",
|
|
cssClass: "icon-packet",
|
|
canView: function (d) {
|
|
return d.type === 'hello-world';
|
|
},
|
|
view: function (domainObject) {
|
|
var vm;
|
|
|
|
return {
|
|
show: function (container) {
|
|
vm = new Vue(HelloWorld);
|
|
container.appendChild(vm.$mount().$el);
|
|
},
|
|
destroy: function (container) {
|
|
vm.$destroy();
|
|
}
|
|
};
|
|
}
|
|
});
|
|
|
|
};
|
|
}
|
|
|
|
export default SimpleVuePlugin;
|