import Box from "@mui/material/Box"; import Chip from "@mui/material/Chip"; import Stack from "@mui/material/Stack"; import FavBtn from "./FavBtn"; const exchangeMap = { word_third: "第三人称单数", word_ing: "现在分词", word_done: "过去式", word_past: "过去分词", word_pl: "复数", word_proto: "原词", }; export default function DictCont({ dictResult }) { if (!dictResult) { return; } return (
{dictResult.simple_means?.word_name}
{dictResult.simple_means?.symbols?.map(({ ph_en, ph_am, parts }, idx) => (
{(ph_en || ph_am) && (
{`英[${ph_en || ""}] 美[${ph_am || ""}]`}
)}
))}
{Object.entries(dictResult.simple_means?.exchange || {}) .map(([key, val]) => `${exchangeMap[key] || key}: ${val.join(", ")}`) .join("; ")}
{Object.values(dictResult.simple_means?.tags || {}) .flat() .filter((item) => item) .map((item) => ( ))}
); }