Browse Source

只有巴利文不空才查字典

visuddhinanda 2 năm trước cách đây
mục cha
commit
145b6dac6f

+ 7 - 3
dashboard/src/components/template/Wbw/WbwWord.tsx

@@ -169,12 +169,16 @@ const WbwWordWidget = ({
         style={styleWbw}
         style={styleWbw}
         onMouseEnter={() => {
         onMouseEnter={() => {
           setShowRelationTool(true);
           setShowRelationTool(true);
-          if (intervalRef.current === null) {
+          if (
+            intervalRef.current === null &&
+            wordData.real &&
+            wordData.real.value.length > 0
+          ) {
             //开始计时,计时结束查字典
             //开始计时,计时结束查字典
             intervalRef.current = window.setInterval(
             intervalRef.current = window.setInterval(
               lookup,
               lookup,
-              200,
-              wordData.word.value
+              300,
+              wordData.real.value
             );
             );
           }
           }
         }}
         }}