Ver Fonte

fix(web-admin): refresh product form category tree when page reactivated.

Co-authored-by: Cursor <cursoragent@cursor.com>
wuzilong há 2 semanas atrás
pai
commit
dfd0bb5cc3

+ 5 - 0
web-admin/src/components/business/product-form-dialog/index.vue

@@ -512,6 +512,11 @@
   onMounted(() => {
     if (isPageVariant.value) void handleOpen()
   })
+
+  /** 从「维护分类」返回时(keep-alive 或同实例复用)刷新树选 */
+  onActivated(() => {
+    if (isPageVariant.value) void loadCategoryOptions()
+  })
 </script>
 
 <style scoped lang="scss">