mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-07-08 13:39:32 +08:00
首页筛选框默认选中
This commit is contained in:
parent
cf392c43c6
commit
db16226dd1
@ -167,7 +167,11 @@ const IndexPage = () => {
|
|||||||
|
|
||||||
const onSelect = (selectedKeys: any, info: any) => {
|
const onSelect = (selectedKeys: any, info: any) => {
|
||||||
setCategoryId(selectedKeys[0]);
|
setCategoryId(selectedKeys[0]);
|
||||||
|
if (info.node.key === 0) {
|
||||||
setCategoryText(info.node.title);
|
setCategoryText(info.node.title);
|
||||||
|
} else {
|
||||||
|
setCategoryText(info.node.title.props.children);
|
||||||
|
}
|
||||||
setSelectKey(selectedKeys);
|
setSelectKey(selectedKeys);
|
||||||
hide();
|
hide();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user