Browse Source

翻译模式到wbw模式改变不触发onModeChange

visuddhinanda 3 years ago
parent
commit
f24107e788
1 changed files with 3 additions and 1 deletions
  1. 3 1
      dashboard/src/components/article/ArticleCard.tsx

+ 3 - 1
dashboard/src/components/article/ArticleCard.tsx

@@ -69,7 +69,9 @@ const Widget = ({
       value={mode}
       onChange={(value) => {
         if (typeof onModeChange !== "undefined") {
-          onModeChange(value.toString());
+          if (mode === "read" || value.toString() === "read") {
+            onModeChange(value.toString());
+          }
         }
         setMode(value.toString());
         //发布mode变更