/* * Author: 黎永顺 * name: 更多菜单列表 * Description: * Date: 2023/12/28 */ import React, { Component } from "react"; import { WeaLocaleProvider } from "ecCom"; import { Menu } from "antd"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; class Index extends Component { constructor(props) { super(props); this.state = { showDrop: false }; } render() { const { showDrop } = this.state; const { dropMenuDatas } = this.props; const menu = dropMenuDatas ? { dropMenuDatas.forEach(d => d.key === o.key && typeof d.onClick === "function" && d.onClick(o.key)); }}> { dropMenuDatas && dropMenuDatas.map((d, i) => { return ( {d.icon} {d.content} ); })} : ""; return (
{ !_.isEmpty(dropMenuDatas) && this.setState({ showDrop: true })}> }
this.setState({ showDrop: false })} style={{ display: showDrop ? "block" : "none" }}> this.setState({ showDrop: false })}>
{menu}
); } } export default Index;