| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- /**
- * 存放一些静态变量、Map 等全局可用的变量
- * @author 小鲤鱼听听
- */
- /**
- * 未知文件类型图标
- */
- export const unknownImg = import('@/assets/images/myResource/file/file_unknown.png')
- console.log('unknownImg==', unknownImg.default)
- /**
- * 文件类型图标 Map 映射
- */
- export const fileImgMap = new Map([
- ['avi', import('@/assets/images/myResource/file/file_avi.png')],
- ['bat', import('@/assets/images/myResource/file/file_powershell.png')],
- // ['c', import('@/assets/images/myResource/file/file_c.png')],
- // ['c++', import('@/assets/images/myResource/file/file_c++.png')],
- // ['c#', import('@/assets/images/myResource/file/file_c#.png')],
- ['css', import('@/assets/images/myResource/file/file_css.png')],
- ['go', import('@/assets/images/myResource/file/file_go.png')],
- ['py', import('@/assets/images/myResource/file/file_python.png')],
- ['styl', import('@/assets/images/myResource/file/file_stylus.png')],
- ['less', import('@/assets/images/myResource/file/file_less.png')],
- ['conf', import('@/assets/images/myResource/file/file_nginx.png')],
- ['m', import('@/assets/images/myResource/file/file_objective_c.png')],
- ['scss', import('@/assets/images/myResource/file/file_scss.png')],
- ['sass', import('@/assets/images/myResource/file/file_sass.png')],
- ['csv', import('@/assets/images/myResource/file/file_csv.png')],
- ['dmg', import('@/assets/images/myResource/file/file_dmg.png')],
- ['dir', import('@/assets/images/myResource/file/dir.png')],
- ['doc', import('@/assets/images/myResource/file/file_word.svg')],
- ['docx', import('@/assets/images/myResource/file/file_word.svg')],
- ['exe', import('@/assets/images/myResource/file/file_exe.png')],
- ['html', import('@/assets/images/myResource/file/file_html.png')],
- ['jar', import('@/assets/images/myResource/file/file_jar.png')],
- ['java', import('@/assets/images/myResource/file/file_java.png')],
- ['js', import('@/assets/images/myResource/file/file_js.png')],
- ['json', import('@/assets/images/myResource/file/file_json.png')],
- ['jsp', import('@/assets/images/myResource/file/file_jsp.png')],
- ['kt', import('@/assets/images/myResource/file/file_kotlin.png')],
- ['mp3', import('@/assets/images/myResource/file/file_music.png')],
- ['flac', import('@/assets/images/myResource/file/file_flac.svg')],
- ['oa', import('@/assets/images/myResource/file/file_oa.png')],
- ['open', import('@/assets/images/myResource/file/file_open.png')],
- ['pdf', import('@/assets/images/myResource/file/file_pdf.png')],
- ['php', import('@/assets/images/myResource/file/file_php.png')],
- ['ppt', import('@/assets/images/myResource/file/file_ppt.svg')],
- ['pptx', import('@/assets/images/myResource/file/file_ppt.svg')],
- ['properties', import('@/assets/images/myResource/file/file_properties.png')],
- ['r', import('@/assets/images/myResource/file/file_r.png')],
- ['rar', import('@/assets/images/myResource/file/file_rar.png')],
- ['rs', import('@/assets/images/myResource/file/file_rust.png')],
- ['rtf', import('@/assets/images/myResource/file/file_rtf.png')],
- ['sh', import('@/assets/images/myResource/file/file_shell.png')],
- ['sql', import('@/assets/images/myResource/file/file_sql.png')],
- ['svg', import('@/assets/images/myResource/file/file_svg.png')],
- ['swift', import('@/assets/images/myResource/file/file_swift.png')],
- ['ts', import('@/assets/images/myResource/file/file_typescript.png')],
- ['txt', import('@/assets/images/myResource/file/file_txt.png')],
- ['vue', import('@/assets/images/myResource/file/file_vue.png')],
- ['xls', import('@/assets/images/myResource/file/file_excel.svg')],
- ['xlsx', import('@/assets/images/myResource/file/file_excel.svg')],
- ['xml', import('@/assets/images/myResource/file/file_xml.png')],
- ['zip', import('@/assets/images/myResource/file/file_zip.png')],
- ['7z', import('@/assets/images/myResource/file/file_7z.svg')],
- ['tar', import('@/assets/images/myResource/file/file_tar.svg')],
- ['md', import('@/assets/images/myResource/file/file_markdown.png')],
- ['markdown', import('@/assets/images/myResource/file/file_markdown.png')],
- ['yaml', import('@/assets/images/myResource/file/file_yaml.png')],
- ['yml', import('@/assets/images/myResource/file/file_yaml.png')]
- ])
- /**
- * 支持使用 onlyoffice 打开的文件格式
- */
- export const officeFileType = ['ppt', 'pptx', 'doc', 'docx', 'xls', 'xlsx']
- /**
- * markdown 文件后缀
- */
- export const markdownFileType = ['markdown', 'md']
- /**
- * 文件展示模式选择列表时,所有可供选择的表格列名
- */
- export const allColumnList = ['extendName', 'fileSize', 'uploadTime', 'deleteTime']
- /**
- * 可以用代码编辑器打开的文件后缀和 解析语言、 codemirror 解析模式 mode 映射关系
- * language:解析语言,
- * mime: codemirror 解析模式
- */
- export const fileSuffixCodeModeMap = new Map([
- ['c', { language: 'C', mime: 'text/x-csrc' }],
- ['c++', { language: 'C++', mime: 'text/x-c++src' }],
- ['c#', { language: 'C#', mime: 'text/x-csharp' }],
- ['m', { language: 'Objective-C', mime: 'text/x-objectivec' }],
- ['go', { language: 'GO', mime: 'text/x-go' }],
- ['kt', { language: 'Kotlin', mime: 'text/x-java' }],
- ['css', { language: 'CSS', mime: 'text/css' }],
- ['less', { language: 'Less', mime: 'text/x-less' }],
- ['php', { language: 'PHP', mime: 'text/x-php' }],
- ['bat', { language: 'PowerShell', mime: 'application/x-powershell' }],
- ['py', { language: 'Python', mime: 'text/x-python' }],
- ['properties', { language: 'Properties', mime: 'text/x-properties' }],
- ['R', { language: 'R', mime: 'text/x-rsrc' }],
- ['rs', { language: 'Rust', mime: 'text/x-rustsrc' }],
- ['scss', { language: 'Scss', mime: 'text/x-scss' }],
- ['sass', { language: 'Sass', mime: 'text/x-sass' }],
- ['sh', { language: 'Shell', mime: 'text/x-sh' }],
- ['styl', { language: 'stylus', mime: 'text/x-styl' }],
- ['xml', { language: 'XML', mime: 'text/xml' }],
- ['html', { language: 'HTML', mime: 'text/html' }],
- ['http', { language: 'HTTP', mime: 'text/http' }],
- ['conf', { language: 'Nginx', mime: 'text/x-nginx-conf' }],
- ['java', { language: 'Java', mime: 'text/x-java' }],
- ['js', { language: 'JavaScript', mime: 'text/javascript' }],
- ['ts', { language: 'Typescript', mime: 'text/typescript' }],
- ['json', { language: 'JSON', mime: 'application/json' }],
- ['jsp', { language: 'JSP', mime: 'application/x-jsp' }],
- // ['txt', { language: '', mime: '' }],
- ['vue', { language: 'HTML', mime: 'text/html' }],
- ['sql', { language: 'SQL', mime: 'text/x-sql' }],
- ['swift', { language: 'Swift', mime: 'text/x-swift' }],
- ['yml', { language: 'YAML', mime: 'text/x-yaml' }]
- ])
- /**
- * codemirror 编辑器代码高亮主题列表
- */
- export const codeMirrorThemeList = [
- '3024-day',
- '3024-night',
- 'abbott',
- 'abcdef',
- 'ambiance-mobile',
- 'ambiance',
- 'ayu-dark',
- 'ayu-mirage',
- 'base16-dark',
- 'base16-light',
- 'bespin',
- 'blackboard',
- 'cobalt',
- 'colorforth',
- 'darcula',
- 'dracula',
- 'duotone-dark',
- 'duotone-light',
- 'eclipse',
- 'elegant',
- 'erlang-dark',
- 'gruvbox-dark',
- 'hopscotch',
- 'icecoder',
- 'idea',
- 'isotope',
- 'juejin',
- 'lesser-dark',
- 'liquibyte',
- 'lucario',
- 'material-darker',
- 'material-ocean',
- 'material-palenight',
- 'material',
- 'mbo',
- 'mdn-like',
- 'midnight',
- 'monokai',
- 'moxer',
- 'neat',
- 'neo',
- 'night',
- 'nord',
- 'oceanic-next',
- 'panda-syntax',
- 'paraiso-dark',
- 'paraiso-light',
- 'pastel-on-dark',
- 'railscasts',
- 'rubyblue',
- 'seti',
- 'shadowfox',
- 'solarized',
- 'ssms',
- 'the-matrix',
- 'tomorrow-night',
- 'tomorrow-night-bright',
- 'tomorrow-night-eighties',
- 'ttcn',
- 'twilight',
- 'vibrant-ink',
- 'xq-dark',
- 'xq-light',
- 'yeti',
- 'yonce',
- 'zenburn'
- ]
- /**
- * codemirror 编辑器代码字体大小
- */
- export const fontSizeList = [12, 14, 16, 18, 20, 22, 24, 26, 28, 30]
|