mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 21:26:08 +08:00
Vue migration - remove Vuew.set & this.$set; add vue-migrate script
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
@@ -36,8 +36,8 @@ export default {
|
||||
this.canEditPSPBindings = !!pspBindingSchema;
|
||||
},
|
||||
data() {
|
||||
this.$set(this.value, 'spec', this.value.spec || {});
|
||||
this.$set(this.value.spec, 'podSecurityPolicyTemplateId', this.value.status?.podSecurityPolicyTemplateId || '');
|
||||
this.value['spec'] = this.value.spec || {};
|
||||
this.value.spec['podSecurityPolicyTemplateId'] = this.value.status?.podSecurityPolicyTemplateId || '';
|
||||
|
||||
return {
|
||||
allPSPs: [],
|
||||
@@ -134,9 +134,9 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$set(this.value.metadata, 'namespace', this.$store.getters['currentCluster'].id);
|
||||
this.$set(this.value, 'spec', this.value.spec || {});
|
||||
this.$set(this.value.spec, 'containerDefaultResourceLimit', this.value.spec.containerDefaultResourceLimit || {});
|
||||
this.value.metadata['namespace'] = this.$store.getters['currentCluster'].id;
|
||||
this.value['spec'] = this.value.spec || {};
|
||||
this.value.spec['containerDefaultResourceLimit'] = this.value.spec.containerDefaultResourceLimit || {};
|
||||
},
|
||||
methods: {
|
||||
async save(saveCb) {
|
||||
@@ -178,11 +178,11 @@ export default {
|
||||
},
|
||||
|
||||
onHasOwnerChanged(hasOwner) {
|
||||
this.$set(this, 'membershipHasOwner', hasOwner);
|
||||
this['membershipHasOwner'] = hasOwner;
|
||||
},
|
||||
|
||||
onMembershipUpdate(update) {
|
||||
this.$set(this, 'membershipUpdate', update);
|
||||
this['membershipUpdate'] = update;
|
||||
},
|
||||
|
||||
removeQuota(key) {
|
||||
|
||||
Reference in New Issue
Block a user