- optimize: Only cache
state
/scrollTop
, will not cache children;只缓存state
/scrollTop
,不缓存子组件 - feat:
configKeepAlive
- feat: Optional
useStorage
parameter ("sessionStorage"/"localStorage"), you can refresh the page and keep the cache (beforeRouteLeave
has been called);可选useStorage
参数("sessionStorage"/"localStorage"),可以刷新页面后,保持缓存(已调用beforeRouteLeave
)
- fix: getKeepAlive types
-
configKeepAlive
import
from change:old:
import configKeepAlive from 'keep-alive-comp/dist/configKeepAlive';
new:
import { configKeepAlive } from 'keep-alive-comp';