Get the App
SLTechnology News&Howtos  ›  Development  › 

What does $t () refer to in the vue project

Shulou Source: shulou.com Published: 2022-05-31 21:34:15 10月04日 Update

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!

Tags: Project character file content parameter string method learning practical deeper minimum lieutenant general usage description interest name instance practicality actual container meaning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Linux vpn Huawei Microsoft