mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +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:
@@ -149,7 +149,7 @@ export default {
|
||||
return V;
|
||||
});
|
||||
|
||||
this.$set(this, 'rows', rows);
|
||||
this['rows'] = rows;
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ export default {
|
||||
watch: {
|
||||
'value.type'(neu) {
|
||||
if (neu === 'cd-rom') {
|
||||
this.$set(this.value, 'bus', 'sata');
|
||||
this.value['bus'] = 'sata';
|
||||
this.update();
|
||||
}
|
||||
},
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ export default {
|
||||
|
||||
'value.type'(neu) {
|
||||
if (neu === 'cd-rom') {
|
||||
this.$set(this.value, 'bus', 'sata');
|
||||
this.value['bus'] = 'sata';
|
||||
this.update();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -100,7 +100,7 @@ export default {
|
||||
watch: {
|
||||
'value.type'(neu) {
|
||||
if (neu === 'cd-rom') {
|
||||
this.$set(this.value, 'bus', 'sata');
|
||||
this.value['bus'] = 'sata';
|
||||
this.update();
|
||||
}
|
||||
},
|
||||
@@ -143,11 +143,11 @@ export default {
|
||||
|
||||
if (this.idx === 0) {
|
||||
if (/iso$/i.test(imageResource?.imageSuffix)) {
|
||||
this.$set(this.value, 'type', 'cd-rom');
|
||||
this.$set(this.value, 'bus', 'sata');
|
||||
this.value['type'] = 'cd-rom';
|
||||
this.value['bus'] = 'sata';
|
||||
} else {
|
||||
this.$set(this.value, 'type', 'disk');
|
||||
this.$set(this.value, 'bus', 'virtio');
|
||||
this.value['type'] = 'disk';
|
||||
this.value['bus'] = 'virtio';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ export default {
|
||||
message: this.$store.getters['i18n/t']('harvester.vmTemplate.tips.notExistImage.message')
|
||||
}, { root: true });
|
||||
|
||||
this.$set(this.value, 'image', '');
|
||||
this.value['image'] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
watch: {
|
||||
'value.type'(neu) {
|
||||
if (neu === 'cd-rom') {
|
||||
this.$set(this.value, 'bus', 'sata');
|
||||
this.value['bus'] = 'sata';
|
||||
this.update();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user