This commit is contained in:
lys 2025-01-22 14:00:13 +08:00
parent f4f209c998
commit 3a6dd41f32
1 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,9 @@
import type { MutableRefObject } from "react";
import React, { useEffect, useMemo, useRef, useState } from "react";
import { notification } from "antd";
// @ts-ignore
import type { RelationGraphExpose, RGNode, RGNodeSlotProps, RGOptions } from "relation-graph/react";
// @ts-ignore
import RelationGraph from "relation-graph/react";
import { exceptStr } from "@/utils/common";
import { extractTree } from "@/pages/salaryItemDiagram";
@ -65,7 +67,7 @@ const Index: React.FC = () => {
}
}, [dataSource]);
const showGraph = async () => {
await graphRef.current.setJsonData(dataSource, (graphInstance) => {
await graphRef.current.setJsonData(dataSource, () => {
});
};
const options: RGOptions = useMemo(() => {