mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-04-06 03:57:49 +08:00
25 lines
497 B
TypeScript
25 lines
497 B
TypeScript
import { piniaKeepAliveStore } from '../index'
|
|
|
|
export const useKeepAliveGetters = () => {
|
|
const variable = piniaKeepAliveStore()
|
|
|
|
/**
|
|
*
|
|
* @remark 获取当前可缓存项 name
|
|
*/
|
|
const getKeepAliveInclude = computed(() => variable.keepAliveInclude)
|
|
|
|
return {
|
|
getKeepAliveInclude,
|
|
}
|
|
}
|
|
|
|
export const useKeepAliveActions = () => {
|
|
const { setKeepAliveInclude, getKeepAliveInclude } = piniaKeepAliveStore()
|
|
|
|
return {
|
|
setKeepAliveInclude,
|
|
getKeepAliveInclude,
|
|
}
|
|
}
|