style: 优化文本编辑器文件夹图标样式
This commit is contained in:
parent
296ab322fa
commit
4d80fa6016
@ -458,18 +458,20 @@
|
|||||||
if(file.isFolder){
|
if(file.isFolder){
|
||||||
return 'folder'
|
return 'folder'
|
||||||
}
|
}
|
||||||
if(file.contentType.indexOf('video') > -1){
|
if (file.contentType) {
|
||||||
return 'video'
|
if(file.contentType.indexOf('video') > -1){
|
||||||
}
|
return 'video'
|
||||||
if(file.contentType.startsWith('image')){
|
}
|
||||||
return 'image'
|
if(file.contentType.startsWith('image')){
|
||||||
}
|
return 'image'
|
||||||
if(file.contentType.indexOf('audio') > -1){
|
}
|
||||||
return 'audio'
|
if(file.contentType.indexOf('audio') > -1){
|
||||||
|
return 'audio'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let suffix = file.suffix;
|
let suffix = file.suffix;
|
||||||
if(!suffix && file.name){
|
if(!suffix && file.name){
|
||||||
suffix = file.name.substring(file.name.lastIndexOf('.') + 1);
|
suffix = file.name.substring(file.name.lastIndexOf('.') + 1)
|
||||||
}
|
}
|
||||||
if(iconClass.has(suffix)){
|
if(iconClass.has(suffix)){
|
||||||
return iconClass.get(suffix)
|
return iconClass.get(suffix)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user