提交 77d66157 作者: ZhangLingKun

功能:代码优化

上级 c1aaae93
流水线 #7441 已通过 于阶段
in 4 分 50 秒
......@@ -126,7 +126,7 @@ const CategorySelectView: React.FC<{
const secondID = Number(router?.query?.second);
// 如果路由里面有一级分类id,则初始化一级分类
if (mainID) {
const index = list?.findIndex((i) => i?.value === mainID);
const index = list?.findIndex((i) => i?.value === mainID) || 0;
setCurrentIndex(index);
onMain?.(list[index]?.value);
if (!secondID)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论