Browse Source

change: 包裹处理页shipping-tracking2.修复表格数据更新逻辑.

peter 1 day ago
parent
commit
a7240dad3a
1 changed files with 8 additions and 2 deletions
  1. 8 2
      src/pages/shipping-tracking2/index.vue

+ 8 - 2
src/pages/shipping-tracking2/index.vue

@@ -355,8 +355,8 @@ watch(
   () => currentTab.value,
   (newVal: string) => {
     currentTabResearch.value = newVal
-    reGenerateCurrentListEdit()
   },
+  { immediate: true },
 )
 let reGenerateCurrentListEdit = () => {
   currentListforEdit.value = cloneDeep(computedList.value)
@@ -582,7 +582,13 @@ let computedList = computed(() =>
     ? list.value.filter((i) => i.Container_Number === currentTab.value)
     : list.value.filter((i) => ['', 'null', null].includes(i.Container_Number)),
 )
-
+watch(
+  () => computedList.value,
+  () => {
+    reGenerateCurrentListEdit()
+  },
+  { deep: true, immediate: true },
+)
 // 给表格加背景. 颜色用的tailwind的 green
 const calcRowStyle = ($e: any) => {
   const result = {} as any