我在我的项目中实现了https://kazupon.github.io/vue-i18n/ i18n 本地化。它在 vue 组件/页面上运行良好。但它不适用于纯 javascript 类和 mixin。有办法处理吗?
在example.vue组件中:
<template>
<p>{{ $t("message.hello") }}</p>
...
</template>
<script>
data:(){
...
},
methods:...
i18n: require('path of localization messages.')
</script>
但它不适用于example.js(pure javascript)或example.mjs(mixins)文件。
蛊毒传说
相关分类