Commit 8b975655 authored by 前端-许佳敏's avatar 前端-许佳敏

修复注册页无法自动跳转

parent 3e2ee3cf
......@@ -6,7 +6,6 @@ import deepClone from 'clone'
import { TreeProps } from 'antd/lib/tree'
import { PlusOutlined, DeleteOutlined, PlusCircleOutlined } from '@ant-design/icons'
import cx from 'classnames'
import { EventDataNode } from 'rc-tree/lib/interface'
import { useSelections } from '@umijs/hooks'
export interface TabTreeActions {
......@@ -36,7 +35,7 @@ export interface TabTreeProps extends TreeProps {
// 若传入该字段, 则会作为tree识别的节点, 默认是`key`, 传入后原有的key值将无效
customKey?: string | number;
customTitle?: string | number;
handleSelect?: (key: ReactText, node: EventDataNode) => void | Promise<any>;
handleSelect?: (key: ReactText, node: any) => void | Promise<any>;
handleSubmit?();
toolsRender?: toolsRenderProps;
getMenuSelectData?(): Promise<any>;
......@@ -281,7 +280,8 @@ const TabTree: React.FC<TabTreeProps> = props => {
const reductData = treeReduction(treeData)
const targetInfo = reductData[id]
const parentInfo = reductData[targetInfo.parentId]
return parentInfo || null
// fixbug 当选中根节点下的节点时, 由于无parentId, 需自动补充0
return parentInfo || {id: 0}
}
}
const batchSelect = (items: any) => {
......
......@@ -83,7 +83,7 @@ const UserRegistry = () => {
})
useEffect(() => {
setAsyncSchema(schemas[`schema${current}`])
if(current === 3) runTimerJump()
if(current === 2) runTimerJump()
}, [current, actions])
useEffect(() => {
if(time === 0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment