SkillAgentSearch skills...

Route

原生 js 实现的轻量级路由,且页面跳转间有缓存功能。

Install / Use

/learn @biaochenxuying/Route
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

简介

这是一个原生 js 实现的轻量级路由,且页面跳转间有缓存功能。

某些简单的 H5 的项目是用原生 js 写的,要用到路由,但是现在好用的路由都是和某些框架绑定在一起的,比如 vue-router ,framework7 的路由。

但是又没必要为了一个路由功能而加入一套框架,所以便有了这个轻量级的路由。

文章详情:原生 js 实现一个前端路由 router

效果

效果图

route-origin.gif

效果体验地址:

1. 滑动效果: https://biaochenxuying.github.io/route/index.html

2. 淡入淡出效果: https://biaochenxuying.github.io/route/index2.html

<!-- ## BB 笔者技术以内的 BB。 笔者 BB 首发地址:[【全栈修炼】](https://mp.weixin.qq.com/s/i0AsqMpI1YCSvDyK_zdAqw):https://mp.weixin.qq.com/s/i0AsqMpI1YCSvDyK_zdAqw ![全栈修炼](https://upload-images.jianshu.io/upload_images/12890819-9399d149e09f638e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -->
View on GitHub
GitHub Stars88
CategoryDevelopment
Updated1mo ago
Forks32

Languages

JavaScript

Security Score

100/100

Audited on Feb 3, 2026

No findings