我正在使用nuxt-i18n和@nuxtjs/auth,我想像这样配置auth.redirect
支持 i18n 的选项:
// nuxt.config.js
export default {
modules: [
'@nuxtjs/auth',
'nuxt-i18n',
// ...
],
auth: {
redirect: {
home: localePath('/dashboard'),
// ...
},
},
// ...
};
通常,就像this.$store
,我可以localePath
通过应用程序实例或context
类似this.$localePath
或app.localePath
. 但是如何在nuxt.config.js
文件里面使用它呢?