Files
myprojplanet_vite/src/store/testStore.ts

34 lines
655 B
TypeScript
Raw Normal View History

2021-08-31 18:09:59 +02:00
import { defineStore } from 'pinia'
import { tools } from '@store/Modules/tools'
import { toolsext } from '@store/Modules/toolsext'
export interface ITest {
finishLoading: boolean
}
export const useTestStore = defineStore({
id: 'TestStore',
state: (): ITest => ({
finishLoading: false,
}),
getters: {
isMyLang: (state: ITest) => (rec: { lang: string }): boolean => {
if (!rec.lang) return true
return (rec.lang === toolsext.getLocale(false) || toolsext.getLocale() === '')
},
},
actions: {
2021-09-16 21:08:02 +02:00
testProva() {
2021-08-31 18:09:59 +02:00
let arrpagesroute = null
arrpagesroute = this.isMyLang({ lang: 'test' })
},
},
})