visuddhinanda vor 2 Jahren
Ursprung
Commit
491887d023
1 geänderte Dateien mit 37 neuen und 0 gelöschten Zeilen
  1. 37 0
      dashboard/src/components/nut/Home.tsx

+ 37 - 0
dashboard/src/components/nut/Home.tsx

@@ -8,11 +8,48 @@ import TreeTest from "./TreeTest";
 
 import { Layout } from "antd";
 import CaseFormula from "../template/Wbw/CaseFormula";
+import { IWbw } from "../template/Wbw/WbwWord";
+import { WbwSentCtl } from "../template/WbwSent";
 
 const Widget = () => {
+  let wbwData: IWbw[] = [];
+  const valueMake = (value: string) => {
+    return { value: value, status: 3 };
+  };
+
+  for (let index = 0; index < 20; index++) {
+    wbwData.push({
+      book: 0,
+      para: 1,
+      sn: [index],
+      word: valueMake("Word" + index),
+      real: valueMake("word" + index),
+      meaning: { value: "意思" + index, status: 3 },
+      factors: valueMake("word+word"),
+      confidence: 1,
+    });
+  }
+
   return (
     <Layout>
       <h1>Home</h1>
+      <div style={{ width: 700 }}>
+        <WbwSentCtl
+          book={1}
+          para={1}
+          wordStart={1}
+          wordEnd={10}
+          channelId={"dd"}
+          data={wbwData}
+          display="block"
+          fields={{
+            meaning: true,
+            factors: true,
+            factorMeaning: true,
+            case: true,
+          }}
+        />
+      </div>
       <CaseFormula />
       <h2>TreeTest</h2>
       <TreeTest />