新建销售计划-页面卡死问题分析
现象
可能原因分析
itemSub (index) {
// 当前操作对象添加标记
this.$refs['modifyGoodsItem'][index].changeIndexCurrent()
this.$refs['modifyGoodsItem'][index].changeOperateBtn(false)
// 遍历处理所有数据
this.reRenderDataList()
},
reRenderDataList () { // [!code focus]
const that = this // [!code focus]
const dataList = this.$refs['modifyGoodsItem'].map(li => li.getOperateItem()) // [!code focus]
this.isShowGoodsForm = false // [!code focus]
this.$nextTick(() => { // [!code focus]
that.dataList = dataList.flat(2) // [!code focus]
that.isShowGoodsForm = true // [!code focus]
}) // [!code focus]
}, // [!code focus]
judgeAllComponent () {
let msg = ''
let sum = 1
const judgeArr = this.$refs['modifyGoodsItem'].map(li => li.judgeAll())
for (let i = 0; i < judgeArr.length; i++) {
const li = judgeArr[i]
sum *= li.sum
msg = msg ? msg : li.msg
}
// 显示最终提示语
if (msg) {
this.$elMsg.error(msg)
}
return sum
},解决方案
Last updated
Was this helpful?