Ver Fonte

add chapterStrLen

visuddhinanda há 2 anos atrás
pai
commit
b13cb79220
1 ficheiros alterados com 11 adições e 3 exclusões
  1. 11 3
      dashboard/src/components/corpus/PaliChapterCard.tsx

+ 11 - 3
dashboard/src/components/corpus/PaliChapterCard.tsx

@@ -1,9 +1,9 @@
-import { Row, Col } from "antd";
+import { Row, Col, Space } from "antd";
 import { Typography } from "antd";
 import { Typography } from "antd";
 import { TinyLine } from "@ant-design/plots";
 import { TinyLine } from "@ant-design/plots";
 import TocPath from "./TocPath";
 import TocPath from "./TocPath";
 
 
-const { Title, Link } = Typography;
+const { Title, Text, Link } = Typography;
 
 
 export interface IPaliChapterData {
 export interface IPaliChapterData {
   Title: string;
   Title: string;
@@ -12,6 +12,8 @@ export interface IPaliChapterData {
   Path: string;
   Path: string;
   Book: number;
   Book: number;
   Paragraph: number;
   Paragraph: number;
+  chapterStrLen: number;
+  paragraphCount: number;
   progressLine?: number[];
   progressLine?: number[];
 }
 }
 
 
@@ -68,7 +70,13 @@ const PaliChapterCardWidget = ({ data, onTitleClick }: IWidget) => {
             </Col>
             </Col>
           </Row>
           </Row>
           <Row>
           <Row>
-            <Col></Col>
+            <Col>
+              <Text type="secondary">
+                <Space>
+                  字符数{data.chapterStrLen} | 段落数{data.paragraphCount}
+                </Space>
+              </Text>
+            </Col>
           </Row>
           </Row>
           <Row>
           <Row>
             <Col span={16}></Col>
             <Col span={16}></Col>