Преглед изворни кода

多语言-页面样式调整

guanchunjie пре 3 година
родитељ
комит
fc1808af93

+ 6 - 4
src/components/Personalcenter/AccountSet.vue

@@ -507,7 +507,9 @@ export default {
     }
     .el-input {
       width: 334px;
-      margin-right: 16px;
+    }
+    .el-button {
+      margin: 0 16px;
     }
     .el-select {
       width: 334px;
@@ -535,9 +537,9 @@ export default {
           margin-right: 10px;
         }
       }
-      .btn {
-        margin-left: 0px;
-      }
+      // .btn {
+      //   margin-left: 0px;
+      // }
     }
   }
   .approved_org_list {

+ 18 - 5
src/components/Personalcenter/Mycollect.vue

@@ -11,7 +11,7 @@
       :listCount="listCount"
       :delCount="delCount"
     />
-    <div>
+    <div style="width: fit-content; padding: 0 32px">
       <el-menu
         :default-active="activeIndex"
         class="el-menu-demo"
@@ -115,7 +115,14 @@
               </div>
             </div>
             <div class="main-content-right">
-              <p class="collectTime">{{ item.create_time }}</p>
+              <p
+                :class="[
+                  'collectTime',
+                  language_type == 'AR' ? 'textLeft' : '',
+                ]"
+              >
+                {{ item.create_time }}
+              </p>
 
               <div class="order-btn">
                 <div class="price">
@@ -195,7 +202,7 @@ import Hanzi from "../common/Hanzi.vue";
 import Sentence from "../common/Sentence.vue";
 import SentenceEn from "../common/SentenceEn.vue";
 import Enword from "../common/Enword.vue";
-
+import { mapGetters } from "vuex";
 export default {
   name: "MyCollect",
   //import引入的组件需要注入到对象中才能使用
@@ -239,7 +246,9 @@ export default {
     };
   },
   //计算属性 类似于data概念
-  computed: {},
+  computed: {
+    ...mapGetters(["language_type"]),
+  },
   //监控data中数据变化
   watch: {},
   //方法集合
@@ -578,6 +587,7 @@ export default {
             display: flex;
             flex-direction: column;
             align-items: flex-start;
+            margin: 0 16px;
             .name {
               font-weight: normal;
               font-size: 16px;
@@ -691,7 +701,7 @@ export default {
               font-size: 24px;
               line-height: 40px;
               color: #2c2c2c;
-              margin-right: 12px;
+              margin: 0 12px;
             }
 
             .goPay {
@@ -734,6 +744,9 @@ export default {
               color: #2c2c2c;
               opacity: 0.5;
               margin: 0;
+              &.textLeft {
+                text-align: left;
+              }
             }
           }
         }

+ 18 - 2
src/components/Personalcenter/OrderManage.vue

@@ -29,7 +29,14 @@
         <div class="main" v-for="(item, index) in list" :key="'order' + index">
           <div class="main-top">
             <div class="main-top-left">
-              <p class="orderTime">{{ item.create_time }}</p>
+              <p
+                :class="[
+                  'orderTime',
+                  language_type == 'AR' ? 'marginLeft' : '',
+                ]"
+              >
+                {{ item.create_time }}
+              </p>
               <div class="orderNo">
                 订单编号:<span>{{ item.id }}</span>
               </div>
@@ -91,7 +98,12 @@
               </div>
               <div class="middle-con">
                 <span class="middle-con-text">实付</span>
-                <span class="middle-con-p1 middle-con-p2"
+                <span
+                  :class="[
+                    'middle-con-p1',
+                    'middle-con-p2',
+                    language_type == 'AR' ? 'textLeft' : '',
+                  ]"
                   >¥{{ item.receivables_money }}</span
                 >
               </div>
@@ -536,6 +548,10 @@ export default {
             text-align: right;
             color: #2c2c2c;
             margin-right: 16px;
+            &.marginLeft {
+              margin-right: 0px;
+              margin-left: 16px;
+            }
           }
           .orderNo {
             font-weight: normal;

+ 1 - 1
src/components/common/Hanzi.vue

@@ -1,6 +1,6 @@
 <!--  -->
 <template>
-  <div class="hanzi" v-if="item">
+  <div class="hanzi" dir="ltr" v-if="item">
     <div class="left-part">
       <div class="strockplay-list">
         <div

+ 12 - 2
src/components/common/Modifymail.vue

@@ -48,7 +48,10 @@
                 type="button"
                 v-else
                 @click.prevent="getVerificationCode"
-                class="getVerification"
+                :class="[
+                  'getVerification',
+                  language_type == 'AR' ? 'marginRight' : '',
+                ]"
               >
                 获取验证码
               </button>
@@ -81,6 +84,7 @@
 import { getContent, getStaticContent } from "@/api/ajax";
 import Cookies from "js-cookie";
 import { removeToken } from "@/utils/auth";
+import { mapGetters } from "vuex";
 export default {
   name: "Modifymailbox",
   components: {},
@@ -160,7 +164,9 @@ export default {
       EmailError: null, //邮箱是否正确
     };
   },
-  computed: {},
+  computed: {
+    ...mapGetters(["language_type"]),
+  },
   watch: {},
   //方法集合
   methods: {
@@ -319,6 +325,10 @@ export default {
       background: #ff9900;
       border: 1px solid #ff9900;
       color: white;
+      &.marginRight {
+        margin-right: 16px;
+        margin-left: 0px;
+      }
     }
     .footer-btn {
       &-sure {

+ 1 - 1
src/components/common/Sentence.vue

@@ -1,6 +1,6 @@
 <!--  -->
 <template>
-  <div class="sentence">
+  <div class="sentence" dir="ltr">
     <div class="sent-top">
       <div class="sent-top-left">
         <span class="num">{{ index + 1 }}.</span>