chenrui hace 10 meses
padre
commit
ce9303db69
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. 7 0
      src/views/easyPassManagement/shoppingManagement/list.vue

+ 7 - 0
src/views/easyPassManagement/shoppingManagement/list.vue

@@ -222,6 +222,13 @@ export default {
                 const posNum = _this.loadDataList.findIndex(item => item.categorySn === row.parentSn)
                 const indexNum = _this.loadDataList[posNum].children.findIndex(con => con.categorySn === row.categorySn)
                 _this.loadDataList[posNum].children.splice(indexNum, 1)
+                // 清空子级时,显示选择产品列表
+                if (_this.loadDataList[posNum].children && _this.loadDataList[posNum].children.length === 0) {
+                  _this.loadDataList[posNum].shopCategoryCount = 0
+
+                  const i = _this.expandedRowKeys.findIndex(item => item === row.parentSn)
+                  _this.expandedRowKeys.splice(i, 1)
+                }
               }
               _this.spinning = false
             } else {