Answer the question
In order to leave comments, you need to log in
What does defineComponent mean?
When executing the vue add i18n command in vue cli, after creating the project, a file from i18n will appear with this markup
<template>
<p>{{ $t("hello") }}</p>
</template>
<script>
import { defineComponent } from "vue";
export default defineComponent({
name: "HelloI18n",
});
</script>
<i18n>
{
"en": {
"hello": "Hello i18n in SFC!",
},
}
</i18n>
Answer the question
In order to leave comments, you need to log in
https://v3.vuejs.org/api/global-api.html#definecom...
Free translation:
The function does nothing, only returns the passed object.
Needed to support TypeScript and IDE (autocomplete, etc.)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question