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

+ 2 - 5
dashboard/src/components/template/Wd.tsx

@@ -1,6 +1,6 @@
 import { useState } from "react";
 
-import { command } from "../../reducers/command";
+import { command, lookup } from "../../reducers/command";
 import store from "../../store";
 import { IWidgetDict } from "../dict/DictComponent";
 
@@ -19,10 +19,7 @@ export const WdCtl = ({ text }: IWidgetWdCtl) => {
       }}
       onClick={() => {
         //发送点词查询消息
-        const it: IWidgetDict = {
-          word: text,
-        };
-        store.dispatch(command({ prop: it, type: "dict" }));
+        store.dispatch(lookup(text));
       }}
       style={{
         textDecoration: isHover ? "underline dotted" : "none",