Эх сурвалжийг харах

feat: 移动端标讯收藏留资跳转前缓存页面数据

cuiyalong 1 жил өмнө
parent
commit
4ad0f1bf1f

+ 3 - 1
apps/mobile/src/views/article/components/ActionCollection.vue

@@ -84,7 +84,9 @@ export default {
         status: this.value,
         id: this.id,
         beforeRedirect: async () => {
-          await this.beforeRedirect()
+          if (_this.beforeRedirect) {
+            await _this.beforeRedirect()
+          }
         },
         cancel() {
           _this.syncLabels([])

+ 6 - 1
apps/mobile/src/views/article/components/TabActions.vue

@@ -1,6 +1,11 @@
 <template>
   <section class="tab-actions safe-area-inside-bottom bg-white">
-    <ActionCollection class="tab-action" :id="id" @syncLabels="syncLabels" />
+    <ActionCollection
+      class="tab-action"
+      :id="id"
+      @syncLabels="syncLabels"
+      :beforeRedirect="beforeLeavePage"
+    />
     <QuickMonitor
       class="tab-action"
       :id="id"