You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
t is a vue-i18n translate function: const { t } = useI18n()
But I get an error because breadCrumb meta property is type of string instead of a function, if I do a console.log(route.meta.breadCrumb) I get _NuFrRa_(t)=>t("locale.key", 2).
So I don't know how to pass a function in meta property or do I have to use eval to transform string to function?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I use the
extendRoute
configuration option to attach a function to the meta propertyThen in BreadCrumb component I get
breadCrumb
meta propertyt
is avue-i18n
translate function:const { t } = useI18n()
But I get an error because
breadCrumb
meta property is type ofstring
instead of afunction
, if I do aconsole.log(route.meta.breadCrumb)
I get_NuFrRa_(t)=>t("locale.key", 2)
.So I don't know how to pass a function in meta property or do I have to use
eval
to transformstring
tofunction
?Aditional info
Beta Was this translation helpful? Give feedback.
All reactions