Comments (5)
https://github.com/wefront/feb-alive/blob/master/src/components/feb-alive.js#L115
上层组件复用情况
/a/b/c => /a/b/d // 复用a、b组件
/a/b/c => /a/e // 复用a组件
所以以下情况不会复用组件,a、b
/a/b => /a/b/c
临时解决方案,增加一个空的匹配组件home
/a/b/home => /a/b/c
from feb-alive.
对于 /a/b => /a/b/c 不复用a、b是没有疑问的
疑惑的点在于回退的时候 却没有复用
父路由只有一层的时候:
a => a/b 走到else 此时不会复用a
但是a/b 回退到 a 满足if 此时a是复用的
父路由有两层的时候:
a/b => a/b/c 走到else 不复用a、b
但是从a/b/c 回退到 回到a/b 满足if 但是 a、b也没有复用
from feb-alive.
确实有这个问题,这边修复一下
from feb-alive.
路由复用说明
嵌套路由跳多层嵌套路由:
/a/b => /a/b/c
a复用/b复用/c创建
多层嵌套路由跳嵌套路由:
/a/b/c => /a/b
a复用/b创建
多层嵌套路由同末级跳转:
/a/b/c => /a/b/c?t=xxxx
a复用/b复用/c创建
嵌套路由同末级跳转:
/a/b => /a/b?t=xxxx
a复用/b创建
from feb-alive.
Fixed in 2.1.0
from feb-alive.
Related Issues (13)
- Iframe is inserted in vue will be reloaded HOT 3
- 有一个问题想要请教 HOT 2
- 在 `ensureURL` 中使用 `recoverMeta` 会出现的问题 HOT 6
- feb-alive 的子路由保活 HOT 5
- 路由变化时,feb-alive 会重新 render HOT 11
- 带参数的路由返回后页面变空白 HOT 3
- BUG: 不应将 debug 信息带到源码中,更不应暴露在 window 上 HOT 1
- 页面replace跳转之后缓存实例未清除 HOT 3
- 设置不缓存的子路由也进行缓存了 HOT 1
- 滚动条缓存封装(不是提bug) HOT 4
- 还维护吗 HOT 1
- 这个 route 没有在上下文中出现过。请问这个变量从哪里来? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feb-alive.