首页筛选框默认选中

This commit is contained in:
禺狨 2023-05-10 10:39:40 +08:00
parent cf392c43c6
commit db16226dd1

View File

@ -167,7 +167,11 @@ const IndexPage = () => {
const onSelect = (selectedKeys: any, info: any) => {
setCategoryId(selectedKeys[0]);
setCategoryText(info.node.title);
if (info.node.key === 0) {
setCategoryText(info.node.title);
} else {
setCategoryText(info.node.title.props.children);
}
setSelectKey(selectedKeys);
hide();
};