Prechádzať zdrojové kódy

feat: 修改自定义列文案

zhouyuhao 1 rok pred
rodič
commit
ae3ba44931

+ 20 - 11
src/components/CustomizeColumns/src/CustomizeColumns.vue

@@ -1,6 +1,8 @@
 <script setup lang="ts">
 import { VueDraggable } from 'vue-draggable-plus'
+import { useRoute } from 'vue-router'
 
+const route = useRoute()
 const dialogVisible = ref(false)
 // search筛选的字段
 const searchColumn = ref('')
@@ -150,6 +152,13 @@ const getData = async (reset?: string) => {
       selectColumns.value = res.data.GroupColumnsRight
       nextTick(() => {
         handleTabArrow()
+        // 八秒后关闭引导
+        if (!firstLoad.value) {
+          setTimeout(() => {
+            handleCloseTour('step1')
+            handleCloseTour('step2')
+          }, 8000)
+        }
       })
     }
   })
@@ -170,11 +179,6 @@ const openDialog = async (paramsData: Object, rightDistance: number) => {
       isShowStep1.value = true
       open2.value = true
       isShowStep2.value = true
-      // 五秒后关闭引导
-      setTimeout(() => {
-        handleCloseTour('step1')
-        handleCloseTour('step2')
-      }, 5000)
     }
   })
 }
@@ -362,8 +366,8 @@ defineExpose({
       <div class="tips">
         <span style="font-size: 16px">* </span>
         <span
-          >Drag item over to this selection or click "add" icon to show the column on your booking
-          list</span
+          >Drag item over to this selection or click "add" icon to show the column on your
+          {{ route.path.includes('booking') ? 'booking' : 'shipment' }} list</span
         >
       </div>
     </div>
@@ -411,7 +415,10 @@ defineExpose({
         </div>
       </div>
       <div class="right-select-columns">
-        <div class="title">Selected columns on your booking list</div>
+        <div class="title">
+          Selected columns on your
+          {{ route.path.includes('booking') ? 'booking' : 'shipment' }} list
+        </div>
         <VueDraggable
           v-vloading="loading"
           v-model="selectColumns"
@@ -485,7 +492,7 @@ defineExpose({
         <template #default>
           <div class="description">
             <span>Drag</span> items to the right group or click the "<span>Add</span>" icon to add
-            columns to the shipment list.
+            columns to the {{ route.path.includes('booking') ? 'booking' : 'shipment' }} list.
           </div>
           <div class="got-it-text" @click="handleCloseTour('step1')">Got it</div>
         </template>
@@ -503,10 +510,12 @@ defineExpose({
         <template #default>
           <div class="description">
             <span>Drag</span> items to the left group or click the "<span>Remove</span>" icon to
-            delete columns from the shipment list.
+            delete columns from the
+            {{ route.path.includes('booking') ? 'booking' : 'shipment' }} list.
           </div>
           <div class="description">
-            <span>Drag</span> items up or down to reorder the shipment list, or use the "<span
+            <span>Drag</span> items up or down to reorder the
+            {{ route.path.includes('booking') ? 'booking' : 'shipment' }} list, or use the "<span
               >Move up</span
             >" and "<span>Move down</span>" icons.
           </div>