|
@@ -4,6 +4,7 @@ import { Layout, Affix, Col, Row } from "antd";
|
|
|
|
|
|
|
|
import DictSearch from "./DictSearch";
|
|
import DictSearch from "./DictSearch";
|
|
|
import SearchVocabulary from "./SearchVocabulary";
|
|
import SearchVocabulary from "./SearchVocabulary";
|
|
|
|
|
+import Compound from "./Compound";
|
|
|
|
|
|
|
|
const { Content } = Layout;
|
|
const { Content } = Layout;
|
|
|
|
|
|
|
@@ -14,6 +15,7 @@ interface IWidget {
|
|
|
}
|
|
}
|
|
|
const Widget = ({ word, compact = false, onSearch }: IWidget) => {
|
|
const Widget = ({ word, compact = false, onSearch }: IWidget) => {
|
|
|
const navigate = useNavigate();
|
|
const navigate = useNavigate();
|
|
|
|
|
+ const [split, setSplit] = useState<string>();
|
|
|
const [wordSearch, setWordSearch] = useState<string>();
|
|
const [wordSearch, setWordSearch] = useState<string>();
|
|
|
const [container, setContainer] = useState<HTMLDivElement | null>(null);
|
|
const [container, setContainer] = useState<HTMLDivElement | null>(null);
|
|
|
|
|
|
|
@@ -43,6 +45,9 @@ const Widget = ({ word, compact = false, onSearch }: IWidget) => {
|
|
|
onSearch(value, isFactor);
|
|
onSearch(value, isFactor);
|
|
|
}
|
|
}
|
|
|
}}
|
|
}}
|
|
|
|
|
+ onSplit={(word: string | undefined) => {
|
|
|
|
|
+ setSplit(word);
|
|
|
|
|
+ }}
|
|
|
/>
|
|
/>
|
|
|
</Col>
|
|
</Col>
|
|
|
{compact ? <></> : <Col flex="auto"></Col>}
|
|
{compact ? <></> : <Col flex="auto"></Col>}
|
|
@@ -53,6 +58,7 @@ const Widget = ({ word, compact = false, onSearch }: IWidget) => {
|
|
|
<Row>
|
|
<Row>
|
|
|
{compact ? <></> : <Col flex="auto"></Col>}
|
|
{compact ? <></> : <Col flex="auto"></Col>}
|
|
|
<Col flex="1260px">
|
|
<Col flex="1260px">
|
|
|
|
|
+ <Compound word={wordSearch} add={split} />
|
|
|
<DictSearch word={wordSearch} compact={compact} />
|
|
<DictSearch word={wordSearch} compact={compact} />
|
|
|
</Col>
|
|
</Col>
|
|
|
{compact ? <></> : <Col flex="auto"></Col>}
|
|
{compact ? <></> : <Col flex="auto"></Col>}
|