Commit 0ee02286 authored by GuanHua's avatar GuanHua

fix: 企业商城导航装修问题

parent 413848b8
...@@ -7,6 +7,7 @@ import { useEffect } from 'react' ...@@ -7,6 +7,7 @@ import { useEffect } from 'react'
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
import isEmpty from 'lodash/isEmpty' import isEmpty from 'lodash/isEmpty'
import cx from 'classnames' import cx from 'classnames'
import { cloneDeep } from 'lodash'
import upIcon from '@/asserts/icons/up_icon.png' import upIcon from '@/asserts/icons/up_icon.png'
import downIcon from '@/asserts/icons/down_icon.png' import downIcon from '@/asserts/icons/down_icon.png'
import sortIcon from '@/asserts/icons/sort_icon.png' import sortIcon from '@/asserts/icons/sort_icon.png'
...@@ -32,7 +33,7 @@ const MallNav: React.FC<MallNavProps> = (props) => { ...@@ -32,7 +33,7 @@ const MallNav: React.FC<MallNavProps> = (props) => {
useEffect(() => { useEffect(() => {
if (!isEmpty(menuData)) { if (!isEmpty(menuData)) {
const newList: MenuItemType[] = [...menuData] const newList: MenuItemType[] = cloneDeep(menuData)
newList.shift() newList.shift()
if (newList) { if (newList) {
setList(newList.map(((item, index) => { setList(newList.map(((item, index) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment