bfg-common 1.3.116 → 1.3.118

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.
@@ -456,7 +456,7 @@ const defaultPciDevice: UI_I_PciDevice = {
456
456
  device_name: 'cdrom',
457
457
  }
458
458
  const pciDevicesIndex = ref<number[]>([0])
459
- const pciDevicesType = ref<('new' | 'edit')[]>(['new'])
459
+ const pciDevicesType = ref<('new' | 'edit' | 'removed')[]>(['new'])
460
460
  const pciDevices = ref<UI_I_PciDevice[]>([])
461
461
  watch(
462
462
  () => props.pciDevices,
@@ -485,8 +485,11 @@ const addPciDevice = (): void => {
485
485
  const onRemovePciDevice = (index: number): void => {
486
486
  const removeIndex = pciDevicesIndex.value.indexOf(index)
487
487
  pciDevicesIndex.value = pciDevicesIndex.value.filter((item) => item !== index)
488
- pciDevicesType.value = pciDevicesType.value.filter(
489
- (_item, key) => key !== removeIndex
488
+ pciDevicesType.value = pciDevicesType.value.map(
489
+ (item, key) => {
490
+ if (key !== removeIndex) return 'removed'
491
+ return item
492
+ }
490
493
  )
491
494
 
492
495
  pciDevices.value = pciDevices.value.filter((_pciDevice, key: number) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.116",
4
+ "version": "1.3.118",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",