# 返回
返回方法,支持:
- 无历史栈情况
- 首页为
tabBar
- 页面自定义返回
页面自定义返回优先级:
options.previousPath
- 页面中声明的
getNavigatorPreviousPath
方法,如有 options.home
# 方法
import { goBack } from '@tencent/press-next/common/utils/go-back';
goBack({
home: '/views/index/index',
});
# 类型
export interface IOptions {
home?: string;
previousPath?: string | (() => string);
isHomeTabBar?: boolean;
}
← Toast Tailwindcss →