Arco Design Steps步骤条怎么动态控制当前步骤?
我用 Arco Design 的 Steps 组件,想根据接口返回的数据动态设置当前步骤,但试了直接改 current 值没反应,是哪里不对?
我这样写的:
const [current, setCurrent] = useState(0);
useEffect(() => {
fetchData().then(res => {
setCurrent(res.step); // 比如 res.step 是 2
});
}, []);
但页面上步骤条还是停在第0步,数据明明更新了,控制台打印 current 也是对的……
暂无解答