Pārlūkot izejas kodu

add status in IWord 并显示

visuddhinanda 2 gadi atpakaļ
vecāks
revīzija
951891c37a
1 mainītis faili ar 9 papildinājumiem un 3 dzēšanām
  1. 9 3
      dashboard/src/components/dict/UserDictList.tsx

+ 9 - 3
dashboard/src/components/dict/UserDictList.tsx

@@ -46,6 +46,7 @@ export interface IWord {
   note?: string | null;
   note?: string | null;
   factors?: string | null;
   factors?: string | null;
   dict?: IDictInfo;
   dict?: IDictInfo;
+  status?: number;
   updated_at?: string;
   updated_at?: string;
   created_at?: string;
   created_at?: string;
 }
 }
@@ -204,19 +205,21 @@ const UserDictListWidget = ({
           },
           },
           description: {
           description: {
             dataIndex: "meaning",
             dataIndex: "meaning",
-            title: "整体意思",
-            search: word ? false : undefined,
+            title: "description",
+            search: false,
             render(dom, entity, index, action, schema) {
             render(dom, entity, index, action, schema) {
               return (
               return (
                 <div>
                 <div>
                   <Space>
                   <Space>
                     {entity.meaning}
                     {entity.meaning}
-
+                    {"|"}
                     <TimeShow
                     <TimeShow
                       updatedAt={entity.updated_at}
                       updatedAt={entity.updated_at}
                       createdAt={entity.updated_at}
                       createdAt={entity.updated_at}
                       type="secondary"
                       type="secondary"
                     />
                     />
+                    {"|"}
+                    {entity.status === 5 ? "私有" : "公开"}
                   </Space>
                   </Space>
                   {compact ? (
                   {compact ? (
                     <div>
                     <div>
@@ -232,6 +235,7 @@ const UserDictListWidget = ({
           content: compact
           content: compact
             ? undefined
             ? undefined
             : {
             : {
+                search: false,
                 render(dom, entity, index, action, schema) {
                 render(dom, entity, index, action, schema) {
                   return (
                   return (
                     <div>
                     <div>
@@ -506,6 +510,7 @@ const UserDictListWidget = ({
               note: item.note,
               note: item.note,
               factors: item.factors,
               factors: item.factors,
               dict: item.dict,
               dict: item.dict,
+              status: item.status,
               updated_at: item.updated_at,
               updated_at: item.updated_at,
             };
             };
           });
           });
@@ -568,6 +573,7 @@ const UserDictListWidget = ({
       </Drawer>
       </Drawer>
       <Drawer
       <Drawer
         title={drawerTitle}
         title={drawerTitle}
+        width={500}
         placement="right"
         placement="right"
         open={isEditOpen}
         open={isEditOpen}
         onClose={() => {
         onClose={() => {