1.0.28 • Published 1 month ago

@joker.front/router v1.0.28

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month ago

Joker 路由管理

@joker.front/router是 Joker 前端框架的核心路由组件。

如何使用

import { Router } from "@joker.front/router";

new Router({
    loggerLeve: "info",
    routes: [
        { path: "/", redirect: "/a" },
        {
            path: "/a",
            component: a,
            children: [
                { path: "", component: a1 },
                { path: "a2", component: a2 }
            ]
        }
    ]
});

在组件内可以通过读取router属性来获取路由信息或设置路由:

import { router } from "@joker.front/router";

export default class extends Component {
    test() {
        //跳转
        router.push({
            path: "b"
        });

        //返回
        router.back();

        //获取当前路由
        router.route.value;
    }
}

文档

官网

帮助文档

1.0.28

1 month ago

1.0.19

4 months ago

1.0.21

4 months ago

1.0.20

4 months ago

1.0.18

4 months ago

1.0.17

4 months ago

1.0.13

4 months ago

1.0.12

4 months ago

1.0.11

4 months ago