bfg-common 1.3.119 → 1.3.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue
CHANGED
|
@@ -484,12 +484,20 @@ const addPciDevice = (): void => {
|
|
|
484
484
|
}
|
|
485
485
|
const onRemovePciDevice = (index: number): void => {
|
|
486
486
|
const removeIndex = pciDevicesIndex.value.indexOf(index)
|
|
487
|
+
|
|
488
|
+
if (pciDevicesType.value[index] === 'edit') {
|
|
489
|
+
pciDevicesType.value = pciDevicesType.value.map(
|
|
490
|
+
(item, key) => {
|
|
491
|
+
if (key === removeIndex) return 'removed'
|
|
492
|
+
return item
|
|
493
|
+
}
|
|
494
|
+
)
|
|
495
|
+
sendData()
|
|
496
|
+
return
|
|
497
|
+
}
|
|
487
498
|
pciDevicesIndex.value = pciDevicesIndex.value.filter((item) => item !== index)
|
|
488
|
-
pciDevicesType.value = pciDevicesType.value.
|
|
489
|
-
(
|
|
490
|
-
if (key !== removeIndex) return 'removed'
|
|
491
|
-
return item
|
|
492
|
-
}
|
|
499
|
+
pciDevicesType.value = pciDevicesType.value.filter(
|
|
500
|
+
(_item, key) => key !== removeIndex
|
|
493
501
|
)
|
|
494
502
|
|
|
495
503
|
pciDevices.value = pciDevices.value.filter((_pciDevice, key: number) => {
|