bfg-common 1.3.115 → 1.3.116
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
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
:is-edit="props.isEdit"
|
|
108
108
|
:state="props.state"
|
|
109
109
|
@remove="onRemovePciDevice(pciDevicesIndex[key])"
|
|
110
|
+
@roll-back="onRollBackPciDevice(pciDevicesIndex[key])"
|
|
110
111
|
@send-data="
|
|
111
112
|
onSendDataPciDevicesMethod($event, pciDevicesIndex[key])
|
|
112
113
|
"
|
|
@@ -496,6 +497,13 @@ const onRemovePciDevice = (index: number): void => {
|
|
|
496
497
|
delete sendDataNewPciDevices.value[index]
|
|
497
498
|
sendData()
|
|
498
499
|
}
|
|
500
|
+
const onRollBackPciDevice = (index: number): void => {
|
|
501
|
+
const removeIndex = pciDevicesIndex.value.indexOf(index)
|
|
502
|
+
pciDevicesType.value = pciDevicesType.value.map((item, key) => {
|
|
503
|
+
if (key === removeIndex) return 'edit'
|
|
504
|
+
return item
|
|
505
|
+
})
|
|
506
|
+
}
|
|
499
507
|
|
|
500
508
|
const isShowFileModal = ref<boolean>(false)
|
|
501
509
|
const onAddDevice = (item: UI_I_DropdownTreeItemChild): void => {
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
<atoms-stack-block
|
|
4
4
|
:has-children="true"
|
|
5
5
|
:removable="isRemovable"
|
|
6
|
-
|
|
6
|
+
:is-roll-back="props.type === 'removed'"
|
|
7
|
+
@remove="onRemovePciDevice"
|
|
8
|
+
@roll-back="onRollBackPciDevice"
|
|
7
9
|
>
|
|
8
10
|
<template #stackBlockKey>
|
|
9
11
|
<div class="flex-align-center">
|
|
@@ -74,6 +76,7 @@ const props = defineProps<{
|
|
|
74
76
|
const emits = defineEmits<{
|
|
75
77
|
(event: 'send-data', value: UI_I_SendDataNewPciDevice): void
|
|
76
78
|
(event: 'remove'): void
|
|
79
|
+
(event: 'roll-back'): void
|
|
77
80
|
}>()
|
|
78
81
|
|
|
79
82
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -158,9 +161,12 @@ watch(
|
|
|
158
161
|
{ immediate: true }
|
|
159
162
|
)
|
|
160
163
|
|
|
161
|
-
const
|
|
164
|
+
const onRemovePciDevice = (): void => {
|
|
162
165
|
emits('remove')
|
|
163
166
|
}
|
|
167
|
+
const onRollBackPciDevice = (): void => {
|
|
168
|
+
emits('roll-back')
|
|
169
|
+
}
|
|
164
170
|
</script>
|
|
165
171
|
|
|
166
172
|
<style scoped lang="scss">
|