Skip to content

Commit

Permalink
🦄 refactor: v0.1.35
Browse files Browse the repository at this point in the history
  • Loading branch information
tohsaka888 committed Oct 14, 2022
1 parent 81a3b2e commit 1b99de1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
6 changes: 3 additions & 3 deletions KnowledgeGraph/Controller/graphSlice.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createSlice } from "@reduxjs/toolkit";
import { createSlice, Slice } from "@reduxjs/toolkit";
import type { PayloadAction } from "@reduxjs/toolkit";
import { NodeFrontProps } from "../typings/Node";
import { ConfigProps } from "../typings/Config";
Expand All @@ -22,7 +22,7 @@ type SetNodePositionProps = {
dy: number;
};

export const graphSlice = createSlice({
export const graphSlice: Slice<typeof initialState> = createSlice({
name: "graph",
initialState,
reducers: {
Expand Down Expand Up @@ -103,7 +103,7 @@ export const graphSlice = createSlice({
* @param {any} state
* @returns {any}
*/
showAllNodes: (state) => {
showAllNodes: (state, payload: PayloadAction<void>) => {
state.nodes.forEach((node) => {
node.visible = true;
});
Expand Down
2 changes: 1 addition & 1 deletion KnowledgeGraph/RightClickMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function RightMenuContent() {
}

if (item === "显示所有节点") {
dispatch(showAllNodes());
dispatch(showAllNodes(undefined));
}
setEvent(null);
}}
Expand Down
1 change: 0 additions & 1 deletion KnowledgeGraph/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
NodeFrontProps,
RightMenuProps,
ConfigProps,
CanvasConfig,
} from "../KnowledgeGraph/index";

type ConfigContextProps = {
Expand Down
6 changes: 1 addition & 5 deletions tsconfig.typescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
"compilerOptions": {
"target": "es6",
"jsx": "react",
"baseUrl": ".",
"outDir": "lib/typescript",
"allowSyntheticDefaultImports": true,
"declaration": true,
"emitDeclarationOnly": true,
"skipLibCheck": true,
"moduleResolution": "node",
"paths": {
"KnowledgeGraph/*": ["KnowledgeGraph/*"]
}
"moduleResolution": "node"
},
"include": ["KnowledgeGraph/**/*"]
}

0 comments on commit 1b99de1

Please sign in to comment.