Skip to content

Commit c27d346

Browse files
committed
fix: del mock data
del mock data
1 parent f5c1890 commit c27d346

File tree

3 files changed

+6
-146
lines changed

3 files changed

+6
-146
lines changed

src/components/tree/index.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const TreeView: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
5555
// const [value, setValue] = useState<string>('')
5656
const getContextMenuList = (type?: FileType) => {
5757
let contextMenu: IMenuItem[] = [];
58-
if (type === 'folder') {
58+
if (type === FileTypes.FOLDER) {
5959
contextMenu = [
6060
{
6161
id: 'newFile',
@@ -88,7 +88,7 @@ const TreeView: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
8888
name: 'Delete',
8989
},
9090
];
91-
} else if (type === 'file') {
91+
} else if (type === FileTypes.FILE) {
9292
contextMenu = [
9393
{
9494
id: 'openToSide',
@@ -206,11 +206,11 @@ const TreeView: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
206206
updateFile &&
207207
updateFile(item, e.target.value, index);
208208
}}
209-
onChange={(e) => {}}
209+
onChange={(e) => { }}
210210
/>
211211
) : (
212-
name
213-
)
212+
name
213+
)
214214
}
215215
key={id}
216216
icon={modify ? '' : <Icon type={icon} />}

src/extensions/explore/treeMock.ts

-140
This file was deleted.

src/services/workbench/explorerService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class ExplorerService
7474
* + 支持工作空间/多目录结构
7575
* + 支持本地文件导入
7676
*/
77-
if (type === 'folder') {
77+
if (type === FileTypes.FOLDER) {
7878
if (!original?.length) {
7979
original?.push(fileData);
8080
}

0 commit comments

Comments
 (0)