File tree 3 files changed +6
-146
lines changed
3 files changed +6
-146
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ const TreeView: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
55
55
// const [value, setValue] = useState<string>('')
56
56
const getContextMenuList = ( type ?: FileType ) => {
57
57
let contextMenu : IMenuItem [ ] = [ ] ;
58
- if ( type === 'folder' ) {
58
+ if ( type === FileTypes . FOLDER ) {
59
59
contextMenu = [
60
60
{
61
61
id : 'newFile' ,
@@ -88,7 +88,7 @@ const TreeView: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
88
88
name : 'Delete' ,
89
89
} ,
90
90
] ;
91
- } else if ( type === 'file' ) {
91
+ } else if ( type === FileTypes . FILE ) {
92
92
contextMenu = [
93
93
{
94
94
id : 'openToSide' ,
@@ -206,11 +206,11 @@ const TreeView: React.FunctionComponent<ITreeProps> = (props: ITreeProps) => {
206
206
updateFile &&
207
207
updateFile ( item , e . target . value , index ) ;
208
208
} }
209
- onChange = { ( e ) => { } }
209
+ onChange = { ( e ) => { } }
210
210
/>
211
211
) : (
212
- name
213
- )
212
+ name
213
+ )
214
214
}
215
215
key = { id }
216
216
icon = { modify ? '' : < Icon type = { icon } /> }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export class ExplorerService
74
74
* + 支持工作空间/多目录结构
75
75
* + 支持本地文件导入
76
76
*/
77
- if ( type === 'folder' ) {
77
+ if ( type === FileTypes . FOLDER ) {
78
78
if ( ! original ?. length ) {
79
79
original ?. push ( fileData ) ;
80
80
}
You can’t perform that action at this time.
0 commit comments