Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

san-router

Package Overview
Dependencies
0
Maintainers
2
Versions
16
Issues
File Explorer

Advanced tools

san-router

Router for San

    2.0.0latest

Version published
Maintainers
2
Yearly downloads
6,993
increased by93.34%

Weekly downloads

Changelog

Source

2.0.0

  • [change] 删除路由相关组件的 route 数据项中的 config 属性
  • [change] 删除 router 监听器的第二参数 config。可由第一参数的属性 eventArg.config 获得匹配路由的配置项
  • [feature] router.add 方法支持数组参数,批量添加路由
  • [feature] 增加 withRoute 方法,支持内层组件的路由感知
  • [feature] 增加 createLink 方法,支持创建非默认路由的 Link 组件
  • [fix] 当路由 listener 中调用暂停再恢复时,异步组件初始化多次

Readme

Source

san-router

NPM version License

San 框架的官方 router,支持动态路由,嵌套路由,路由懒加载以及导航守卫等功能。

注意:使用 san-router,要求 San 的版本号 >= 3.0.2

文档 | 示例项目

下载

# use npm npm i san-router # or use yarn yarn add san-router

使用

如需了解更多功能,请访问 快速开始

import {router, Link} from 'san-router'; router.add({ rule: '/book', Component: BookDetail }); router.add([ { rule: '/about', Component: About }, { rule: '/home', Component: Home } ]); router.start();

CHANGELOG

CHANGELOG

License

san-router is MIT licensed.

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc