import uniNavigate from 'ton.uni.navigate';
// 定义页面接口
interface IPage {
path: string;
name: string;
meta: {
target: string;
};
}
// 示例 pages 数组
const pages: IPage[] = [
{
path: '/home',
name: 'HomePage',
meta: {
target: 'self'
}
},
{
path: '/about',
name: 'AboutPage',
meta: {
target: 'blank'
}
}
];
// 创建导航实例
const handle = new uniNavigate(pages);
// 导航调用(可以是字符串或者页面对象)
handle.to('/home');
handle.to({
path: '/about',
name: 'AboutPage',
meta: {
target: 'blank'
}
});
-
Notifications
You must be signed in to change notification settings - Fork 0
makebin/ton.uni.navigate
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
uniapp 页面跳转助手
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published