Browse Source

fix: 解决useI18n报黄色警告的问题

曾坤森 3 months ago
parent
commit
bec6f605ff
2 changed files with 13 additions and 12 deletions
  1. 1 0
      src/api/interceptor.ts
  2. 12 12
      src/views/dashboard/workplace/index.vue

+ 1 - 0
src/api/interceptor.ts

@@ -36,6 +36,7 @@ instance.interceptors.request.use(
 instance.interceptors.response.use(
   (response: AxiosResponse) => {
     const res = response.data;
+    console.log('res', res);
     if (response.status === 401) {
       Modal.error({
         title: 'Confirm logout',

+ 12 - 12
src/views/dashboard/workplace/index.vue

@@ -13,12 +13,12 @@
               <a-col :span="6">
                 <a-form-item
                   field="address"
-                  :label="$t('dashboard.form.address')"
+                  :label="t('dashboard.form.address')"
                   label-col-flex="50px"
                 >
                   <a-input
                     v-model="formModel.address"
-                    :placeholder="$t('dashboard.form.address')"
+                    :placeholder="t('dashboard.form.address')"
                     allow-clear
                   />
                 </a-form-item>
@@ -26,12 +26,12 @@
               <a-col :span="6">
                 <a-form-item
                   field="name"
-                  :label="$t('dashboard.form.name')"
+                  :label="t('dashboard.form.name')"
                   label-col-flex="50px"
                 >
                   <a-input
                     v-model="formModel.name"
-                    :placeholder="$t('dashboard.form.name')"
+                    :placeholder="t('dashboard.form.name')"
                     allow-clear
                   />
                 </a-form-item>
@@ -39,12 +39,12 @@
               <a-col :span="6">
                 <a-form-item
                   field="entityType"
-                  :label="$t('dashboard.form.entityType')"
+                  :label="t('dashboard.form.entityType')"
                   label-col-flex="60px"
                 >
                   <a-select
                     v-model="formModel.entityType"
-                    :placeholder="$t('dashboard.form.entityType')"
+                    :placeholder="t('dashboard.form.entityType')"
                     allow-clear
                   >
                     <a-option
@@ -58,12 +58,12 @@
               <a-col :span="6">
                 <a-form-item
                   field="statusTypeList"
-                  :label="$t('dashboard.form.status')"
+                  :label="t('dashboard.form.status')"
                   label-col-flex="60px"
                 >
                   <a-select
                     v-model="formModel.status"
-                    :placeholder="$t('dashboard.form.status')"
+                    :placeholder="t('dashboard.form.status')"
                     allow-clear
                   >
                     <a-option
@@ -76,7 +76,7 @@
               </a-col>
               <a-col :span="6">
                 <a-form-item
-                  :label="$t('dashboard.form.timeRange')"
+                  :label="t('dashboard.form.timeRange')"
                   label-col-flex="60px"
                 >
                   <a-range-picker v-model="formModel.time" />
@@ -92,13 +92,13 @@
               <template #icon>
                 <icon-search />
               </template>
-              {{ $t('searchTable.form.search') }}
+              {{ t('searchTable.form.search') }}
             </a-button>
             <a-button @click="reset">
               <template #icon>
                 <icon-refresh />
               </template>
-              {{ $t('searchTable.form.reset') }}
+              {{ t('searchTable.form.reset') }}
             </a-button>
           </a-space>
           <a-space class="right-side">
@@ -106,7 +106,7 @@
               <template #icon>
                 <icon-download />
               </template>
-              {{ $t('searchTable.form.down') }}
+              {{ t('searchTable.form.down') }}
             </a-button>
           </a-space>
         </a-col>