Skip to content

Commit

Permalink
feat: prettier format code
Browse files Browse the repository at this point in the history
prettier format code
  • Loading branch information
zhangtengjin authored and wewoor committed Mar 11, 2021
1 parent 46343fd commit 768885c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/components/collapse/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Collapse: React.FunctionComponent<ICollapseProps> = (
const [state, setState] = useState<IState>(initState);
const { className, data = [], onCollapseChange, ...restProps } = props;
const onChangeCallback = (key: React.Key[]) => {
onCollapseChange?.(key)
onCollapseChange?.(key);
setState((state: IState) => ({ ...state, activePanelKeys: key }));
};
const onClick = (e, item) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/collapse/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
// test
.samplefolder {
.rc-collapse-content {
height: 800px;
height: 600px;
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/controller/explorer/explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export class ExplorerController
};

explorerService.addPanel([sampleFolderPanel]);

}

private createFile = (e, type) => {
Expand Down Expand Up @@ -142,6 +141,6 @@ export class ExplorerController
};

public readonly onCollapseChange = (keys) => {
console.log('keys', keys)
}
console.log('keys', keys);
};
}
3 changes: 1 addition & 2 deletions src/controller/explorer/folderTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export class FolderTreeController
this.initView();
}

private initView() {
}
private initView() {}

public readonly onSelectFile = (file: ITreeNodeItem, isAuto?: boolean) => {
const tabData = {
Expand Down
30 changes: 16 additions & 14 deletions src/workbench/sidebar/explore/folderTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,20 @@ const FolderTree: React.FunctionComponent<IFolderTree> = (
const contextView = useContextView();

let contextViewMenu;
const folderContextMenu = [{
id: 'addFolder',
name: 'Add Folder to Workspace',
onClick: () => {
explorerService.addRootFolder?.(
new TreeNodeModel({
name: `molecule_temp${Math.random()}`,
fileType: 'rootFolder',
})
);
}
}]
const folderContextMenu = [
{
id: 'addFolder',
name: 'Add Folder to Workspace',
onClick: () => {
explorerService.addRootFolder?.(
new TreeNodeModel({
name: `molecule_temp${Math.random()}`,
fileType: 'rootFolder',
})
);
},
},
];
const onClickMenuItem = useCallback(
(e, item) => {
contextViewMenu?.dispose();
Expand Down Expand Up @@ -139,8 +141,8 @@ const FolderTree: React.FunctionComponent<IFolderTree> = (
onBlur={handleInputBlur}
/>
) : (
name
);
name
);
};

const renderByData = (
Expand Down

0 comments on commit 768885c

Please sign in to comment.