diff --git a/apps/web-antd/src/views/mall/product/spu/form/modules/product-attributes.vue b/apps/web-antd/src/views/mall/product/spu/form/modules/product-attributes.vue index d3948b94f..0fa3c5db6 100644 --- a/apps/web-antd/src/views/mall/product/spu/form/modules/product-attributes.vue +++ b/apps/web-antd/src/views/mall/product/spu/form/modules/product-attributes.vue @@ -82,10 +82,10 @@ watch( /** 删除属性值 */ function handleCloseValue(index: number, value: PropertyAndValues) { - if (attributeList.value[index]) { - attributeList.value[index].values = attributeList.value?.[ + if (attributeList.value[index]?.values) { + attributeList.value[index].values = attributeList.value[ index - ]?.values?.filter((item) => item.id !== value.id); + ].values?.filter((item) => item.id !== value.id); } } @@ -166,9 +166,8 @@ async function getAttributeOptions(propertyId: number) {