Skip to content

Commit

Permalink
fix: del mock data
Browse files Browse the repository at this point in the history
del mock data
  • Loading branch information
zhangtengjin committed Dec 3, 2020
1 parent f5c1890 commit c27d346
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 146 deletions.
10 changes: 5 additions & 5 deletions src/components/tree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const TreeView: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
// const [value, setValue] = useState<string>('')
const getContextMenuList = (type?: FileType) => {
let contextMenu: IMenuItem[] = [];
if (type === 'folder') {
if (type === FileTypes.FOLDER) {
contextMenu = [
{
id: 'newFile',
Expand Down Expand Up @@ -88,7 +88,7 @@ const TreeView: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
name: 'Delete',
},
];
} else if (type === 'file') {
} else if (type === FileTypes.FILE) {
contextMenu = [
{
id: 'openToSide',
Expand Down Expand Up @@ -206,11 +206,11 @@ const TreeView: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
updateFile &&
updateFile(item, e.target.value, index);
}}
onChange={(e) => {}}
onChange={(e) => { }}
/>
) : (
name
)
name
)
}
key={id}
icon={modify ? '' : <Icon type={icon} />}
Expand Down
140 changes: 0 additions & 140 deletions src/extensions/explore/treeMock.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/services/workbench/explorerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class ExplorerService
* + 支持工作空间/多目录结构
* + 支持本地文件导入
*/
if (type === 'folder') {
if (type === FileTypes.FOLDER) {
if (!original?.length) {
original?.push(fileData);
}
Expand Down

0 comments on commit c27d346

Please sign in to comment.