Просмотр исходного кода

点语法信息按钮弹出右边栏

visuddhinanda 1 год назад
Родитель
Сommit
665fcc88ec

+ 2 - 0
dashboard/src/components/template/Wbw/WbwDetailBasicRelation.tsx

@@ -6,6 +6,7 @@ import { grammar } from "../../../reducers/command";
 import { IWbw, IWbwField } from "./WbwWord";
 import { useIntl } from "react-intl";
 import { useState } from "react";
+import { openPanel } from "../../../reducers/right-panel";
 
 interface IWidget {
   data: IWbw;
@@ -48,6 +49,7 @@ const WbwDetailBasicRelationWidget = ({
                       .join(",");
                     console.debug("from", fromList, endCase);
                     store.dispatch(grammar(endCase));
+                    store.dispatch(openPanel("grammar"));
                   }
                 }}
                 icon={<QuestionCircleOutlined />}

+ 2 - 0
dashboard/src/components/template/Wbw/WbwDetailRelation.tsx

@@ -15,6 +15,7 @@ import store from "../../../store";
 import { add, relationAddParam } from "../../../reducers/relation-add";
 import { IRelation } from "../../../pages/admin/relation/list";
 import { grammar } from "../../../reducers/command";
+import { openPanel } from "../../../reducers/right-panel";
 
 interface IOptions {
   value: string;
@@ -277,6 +278,7 @@ const WbwDetailRelationWidget = ({
               icon={<InfoCircleOutlined />}
               onClick={() => {
                 store.dispatch(grammar(relation[index].relation));
+                store.dispatch(openPanel("grammar"));
               }}
             />
             {item.dest_spell ? item.dest_spell : addButton}