diff --git a/src/components/Common/AffixMenu.js b/src/components/Common/AffixMenu.js index f8e0cdd..9a21929 100644 --- a/src/components/Common/AffixMenu.js +++ b/src/components/Common/AffixMenu.js @@ -406,7 +406,7 @@ class AffixMenuComponent extends Component { } else { dataSource = this.state[`modalContentData${count}`]; } - dataSource.forEach((item, index) => { + dataSource?.forEach((item, index) => { // 根据索引来更新 iOrder,使用 index + 1 因为排序通常从1开始,而不是0 dataSource[index].iOrder = (index + 1) * 10; });