فهرست منبع

支持指定 tags

visuddhinanda 2 سال پیش
والد
کامیت
c6cba28cba
2فایلهای تغییر یافته به همراه7 افزوده شده و 2 حذف شده
  1. 4 2
      dashboard/src/components/term/TermEdit.tsx
  2. 3 0
      dashboard/src/components/term/TermModal.tsx

+ 4 - 2
dashboard/src/components/term/TermEdit.tsx

@@ -61,6 +61,7 @@ export interface ITerm {
 interface IWidget {
   id?: string;
   word?: string;
+  tags?: string[];
   studioName?: string;
   channelId?: string;
   parentChannelId?: string;
@@ -71,6 +72,7 @@ interface IWidget {
 const TermEditWidget = ({
   id,
   word,
+  tags,
   channelId,
   studioName,
   parentChannelId,
@@ -210,7 +212,7 @@ const TermEditWidget = ({
           let url: string;
           let data: ITerm = {
             word: word ? word : "",
-            tag: "",
+            tag: tags?.join(),
             meaning: "",
             meaning2: [],
             note: "",
@@ -276,7 +278,7 @@ const TermEditWidget = ({
             console.log(res);
             data = {
               word: word ? word : "",
-              tag: "",
+              tag: tags?.join(),
               meaning: "",
               meaning2: [],
               note: "",

+ 3 - 0
dashboard/src/components/term/TermModal.tsx

@@ -9,6 +9,7 @@ interface IWidget {
   open?: boolean;
   id?: string;
   word?: string;
+  tags?: string[];
   studioName?: string;
   channelId?: string;
   parentChannelId?: string;
@@ -22,6 +23,7 @@ const TermModalWidget = ({
   open = false,
   id,
   word,
+  tags,
   studioName,
   channelId,
   parentChannelId,
@@ -91,6 +93,7 @@ const TermModalWidget = ({
         <TermEdit
           id={id}
           word={word}
+          tags={tags}
           studioName={studioName}
           channelId={channelId}
           parentChannelId={parentChannelId}