visuddhinanda 2 лет назад
Родитель
Сommit
a6f3df2aeb
1 измененных файлов с 14 добавлено и 22 удалено
  1. 14 22
      dashboard/src/components/template/Wd.tsx

+ 14 - 22
dashboard/src/components/template/Wd.tsx

@@ -1,34 +1,26 @@
 import { useState } from "react";
 import { useState } from "react";
 
 
-import { command, lookup } from "../../reducers/command";
+import { lookup } from "../../reducers/command";
 import store from "../../store";
 import store from "../../store";
-import { IWidgetDict } from "../dict/DictComponent";
+import "./style.css";
 
 
 interface IWidgetWdCtl {
 interface IWidgetWdCtl {
   text?: string;
   text?: string;
 }
 }
 export const WdCtl = ({ text }: IWidgetWdCtl) => {
 export const WdCtl = ({ text }: IWidgetWdCtl) => {
-  const [isHover, setIsHover] = useState(false);
   return (
   return (
-    <span
-      onMouseEnter={() => {
-        setIsHover(true);
-      }}
-      onMouseLeave={() => {
-        setIsHover(false);
-      }}
-      onClick={() => {
-        //发送点词查询消息
-        store.dispatch(lookup(text));
-      }}
-      style={{
-        textDecoration: isHover ? "underline dotted" : "none",
-        textUnderlineOffset: 4,
-        cursor: "pointer",
-      }}
-    >
-      {text}{" "}
-    </span>
+    <>
+      {text !== "ti" ? " " : undefined}
+      <span
+        className="pcd_word"
+        onClick={() => {
+          //发送点词查询消息
+          store.dispatch(lookup(text));
+        }}
+      >
+        {text}
+      </span>
+    </>
   );
   );
 };
 };