2025-06-28 21:10:52 +08:00
|
|
|
export const state = () => ({
|
2025-06-29 01:26:10 +08:00
|
|
|
locales: ['en', 'zh'],
|
|
|
|
locale: 'en'
|
2025-06-28 21:10:52 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
export const mutations = {
|
2025-06-29 01:26:10 +08:00
|
|
|
SET_LANG (state, locale) {
|
|
|
|
if (state.locales.includes(locale)) {
|
|
|
|
state.locale = locale
|
|
|
|
}
|
2025-06-28 21:10:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export const actions = {
|
|
|
|
|
|
|
|
}
|