From 20049bd5cb147595e4749c18f9b10b8540d3484e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Mon, 13 Dec 2021 17:05:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=AD=9B=E9=80=89=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新筛选菜单组件的交互 --- src/components/filterSelect/main.js | 17 ++++++++++++++--- src/components/filterbar/main.js | 3 +++ src/components/menu/main.js | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/components/filterSelect/main.js b/src/components/filterSelect/main.js index a669716d..44eea430 100644 --- a/src/components/filterSelect/main.js +++ b/src/components/filterSelect/main.js @@ -11,7 +11,7 @@ import Menu from "../menu/main.js" constructor(props) { super(props); - + props.data.menuList[0].check = true; this.state = { id:props.data.id, @@ -19,9 +19,10 @@ import Menu from "../menu/main.js" selectedMenu: props.data.menuList[0], menuList:props.data.menuList, visible:true, - menuShow:false, + menuShow:true, } this.state.text = props.data.menuList[0].name; + } onHandlerClick(){ let isShow = !this.state.menuShow; @@ -46,6 +47,16 @@ import Menu from "../menu/main.js" onselectFn(e){ } + onClose(e,id){ + + this.props.onClose(e,this.state.id) + let menuList = _.map(this.state.menuList,(item)=>{ + item.check = false; + return item + }) + this.setState({menuList:menuList}) + } + render() { return (