What does $t () refer to in the vue project
This article mainly explains "what does $t () in the vue project refer to". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what does $t () in the vue project mean?"
The meaning of $t () in vue
In general, the number of Chinese characters will be minimized in the project vue file, so you need to use a file container to store them.
For example:
The string in $t () here is actually a parameter in the hs file in a directory.
Export default {modal: {placeholder: 'please enter', userName: 'name'}
Export
Import staffManage from'. / platform/staff-manage/index';const locale = {staffManage} export default locale
If called in the script tag. Then directly this.$t ()
Instructions for using $t () in vue
Example:
Description:
T is a method attached to Vue.prototype that accepts a string as a parameter, the headTitle of data-table
At this point, I believe you have a deeper understanding of "what is meant by $t () in the vue project". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!