@tarojs/router
TypeScript icon, indicating that this package has built-in type declarations

3.6.28 • Public • Published

@tarojs/router

H5 端路由系统。

核心 API

createRouter(app, config, type, framework, reactdom)

暴露给 @tarojs/taro-loader/h5 调用,在应用入口文件中调用,创建一个兼容小程序路由规范的应用。

参数

app

入口文件默认导出的组件

config

应用全局配置及页面配置。对应 app.config.jspage.config.js 的返回内容。

type

框架类型,react | vue | nerv 三选一。

framework

框架的 default import 对象。

reactdom

可选,react-dom 的 default import 对象。

/@tarojs/router/

    Package Sidebar

    Install

    npm i @tarojs/router

    Weekly Downloads

    10,174

    Version

    3.6.28

    License

    MIT

    Unpacked Size

    259 kB

    Total Files

    46

    Last publish

    Collaborators

    • qq592743779
    • baosiqing
    • zakary
    • advancedcat
    • yuche
    • xuanzebin
    • defaultlee
    • drchan
    • kyjo