pro-components
pro-components copied to clipboard
🧐[问题]使用StepsForm时,如何实现 点击步骤跳转到指定步骤?
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🧐 问题描述
💻 示例代码
<StepsForm
stepsProps={{
direction: 'horizontal',
type: 'navigation'
}}
key={'StepsForm_top'}
current={current}
onCurrentChange={(current) => {
console.log('current:', current);
setCurrent(current)
}}
stepsRender={(steps, defaultDom) => {
console.log('steps:', steps, defaultDom);
return <a onClick={(event) => {
console.log(event);
}}>{defaultDom}</a>;
}}
想通过使用 stepsRender来实现,但是没有current参数,不知道当前是第几步,请问如何实现