提交 0847e5e1 authored 作者: wangjiahao's avatar wangjiahao

refactor: 前端异常处理

上级 7411e5ca
...@@ -499,19 +499,22 @@ function movePlayer(item, position) { ...@@ -499,19 +499,22 @@ function movePlayer(item, position) {
} }
function removeItem(index) { function removeItem(index) {
const vm = this try {
const item = this.yourList[index] const vm = this
removeItemFromPositionBox(item) const item = this.yourList[index]
removeItemFromPositionBox(item)
const belowItems = findBelowItems.call(this, item)
_.forEach(belowItems, function(upItem) { const belowItems = findBelowItems.call(this, item)
const canGoUpRows = canItemGoUp(upItem) _.forEach(belowItems, function(upItem) {
if (canGoUpRows > 0) { const canGoUpRows = canItemGoUp(upItem)
moveItemUp.call(vm, upItem, canGoUpRows) if (canGoUpRows > 0) {
} moveItemUp.call(vm, upItem, canGoUpRows)
}) }
})
this.yourList.splice(index, 1, {}) this.yourList.splice(index, 1, {})
} catch (e) {
console.log('removeItem have some ignore error')
}
} }
// 矩阵设计初始化的时候 预占位,防止编辑仪表板页面,初始化和视图编辑返回时出现组件位置变化问题 // 矩阵设计初始化的时候 预占位,防止编辑仪表板页面,初始化和视图编辑返回时出现组件位置变化问题
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论