mirror of
https://github.com/nasa/openmct.git
synced 2025-02-15 15:12:52 +00:00
refactor: move to created
hook, remove initialize function
This commit is contained in:
parent
0d5041d289
commit
417ff41331
@ -199,21 +199,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initialize();
|
|
||||||
|
|
||||||
this.status = this.openmct.status.get(this.series.domainObject.identifier);
|
|
||||||
this.removeStatusListener = this.openmct.status.observe(
|
|
||||||
this.series.domainObject.identifier,
|
|
||||||
this.setStatus
|
|
||||||
);
|
|
||||||
},
|
|
||||||
beforeUnmount() {
|
|
||||||
if (this.removeStatusListener) {
|
|
||||||
this.removeStatusListener();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initialize() {
|
|
||||||
this.fields = [
|
this.fields = [
|
||||||
{
|
{
|
||||||
modelProp: 'yKey',
|
modelProp: 'yKey',
|
||||||
@ -261,7 +246,19 @@ export default {
|
|||||||
value: key
|
value: key
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.status = this.openmct.status.get(this.series.domainObject.identifier);
|
||||||
|
this.removeStatusListener = this.openmct.status.observe(
|
||||||
|
this.series.domainObject.identifier,
|
||||||
|
this.setStatus
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
if (this.removeStatusListener) {
|
||||||
|
this.removeStatusListener();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
dynamicPathForKey(key) {
|
dynamicPathForKey(key) {
|
||||||
return function (object, model) {
|
return function (object, model) {
|
||||||
const modelIdentifier = model.get('identifier');
|
const modelIdentifier = model.get('identifier');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user