Jelajahi Sumber

vocabulary=true

visuddhinanda 2 tahun lalu
induk
melakukan
e5e6d71c73
1 mengubah file dengan 15 tambahan dan 13 penghapusan
  1. 15 13
      dashboard/src/load.ts

+ 15 - 13
dashboard/src/load.ts

@@ -123,20 +123,22 @@ const init = () => {
   );
 
   //获取 relation 表
-  get<IRelationListResponse>(`/v2/relation?limit=1000`).then((json) => {
-    if (json.ok) {
-      const items: IRelation[] = json.data.rows.map((item, id) => {
-        return {
-          id: item.id,
-          name: item.name,
-          case: item.case,
-          from: item.from,
-          to: item.to,
-        };
-      });
-      store.dispatch(pushRelation(items));
+  get<IRelationListResponse>(`/v2/relation?vocabulary=true&limit=1000`).then(
+    (json) => {
+      if (json.ok) {
+        const items: IRelation[] = json.data.rows.map((item, id) => {
+          return {
+            id: item.id,
+            name: item.name,
+            case: item.case,
+            from: item.from,
+            to: item.to,
+          };
+        });
+        store.dispatch(pushRelation(items));
+      }
     }
-  });
+  );
 
   //获取用户选择的主题
   const theme = localStorage.getItem("theme");