Explorar el Código

修改数据需要复制一份,否则不会生效

shish hace 2 años
padre
commit
fbb3ab3768
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      ghsApp/src/mixins/product2.js

+ 2 - 0
ghsApp/src/mixins/product2.js

@@ -187,6 +187,8 @@ export default {
 					selectListData[i.id] = i
 				})
 			}
+			//修改数据需要复制一份,否则不会生效
+			that.globalItemData = copyObject(that.globalItemData);
 			for (let i=0;i<that.globalItemData.length;i++){
 				let currentProduct = that.globalItemData[i]
 				let currentPId = currentProduct.id