瀏覽代碼

add i18n in login page

Timmy 1 年之前
父節點
當前提交
1415cdef71
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      hichina-main-front-mobile-first/src/pages/LoginPage.vue

+ 4 - 2
hichina-main-front-mobile-first/src/pages/LoginPage.vue

@@ -13,7 +13,7 @@
             :rules="[(val) => !!val || 'Field is required']"
             color="blue-12"
             v-model="username"
-            label="Enter your email"
+            :label="$t('enter_email')"
             ref="usernameInput"
           >
             <template v-slot:prepend>
@@ -27,7 +27,7 @@
             color="blue-12"
             v-model="password"
             type="password"
-            label="Enter your password"
+            :label="$t('enter_password')"
             ref="passwordInput"
           >
             <template v-slot:prepend>
@@ -54,11 +54,13 @@
 <script>
 import { ref, onMounted, onBeforeMount, getCurrentInstance } from "vue";
 import { useQuasar } from "quasar";
+import { useI18n } from "vue-i18n";
 import { api } from "boot/axios";
 import Qs from "qs";
 export default {
   name: "LoginPage",
   setup() {
+    const { locale, $t } = useI18n();
     const instance = getCurrentInstance();
     const app = getCurrentInstance().appContext.app;
     const gp = app.config.globalProperties;