mart-admin/src/stores/keepAliveNames.ts

15 lines
346 B
TypeScript
Raw Normal View History

import { defineStore } from 'pinia';
import { KeepAliveNamesState } from './interface';
// 路由缓存列表
export const useKeepALiveNames = defineStore('keepALiveNames', {
state: (): KeepAliveNamesState => ({
keepAliveNames: [],
}),
actions: {
async setCacheKeepAlive(data: Array<string>) {
this.keepAliveNames = data;
},
},
});