新增: 文件操作增强与预览扩展
- 文件剪贴板复制剪切粘贴,重名自动副本 - SFTP下载到本机与外部文件拖入,目录递归 - 传输进度浮动面板,transfer-progress事件链 - Drawio预览,Excel工作线程,冻结看门狗 - cmd与bat自写batch语法高亮,psm1等映射补齐
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// drawio 预览插件注册
|
||||
// canHandle 严格匹配 .drawio / .dio 扩展名,不认 .xml(避免误吞配置文件,配置文件走代码编辑器)。
|
||||
|
||||
import type { Component } from 'vue'
|
||||
import { registerPreviewHandler } from '../registry'
|
||||
import type { FilePreviewHandlerDefinition } from '../types'
|
||||
|
||||
// 仅 .drawio / .dio;.drawio.png / .drawio.svg 本就走图片预览,不冲突
|
||||
const DRAWIO_EXT_REGEX = /\.(drawio|dio)$/i
|
||||
|
||||
const drawioHandler: FilePreviewHandlerDefinition = {
|
||||
id: 'drawio-preview',
|
||||
name: 'Draw.io 查看器',
|
||||
icon: '📊',
|
||||
priority: 90,
|
||||
canHandle: (filename: string): boolean => DRAWIO_EXT_REGEX.test(filename || ''),
|
||||
getComponent: (): Promise<Component> =>
|
||||
import('../../components/FileSystem/components/DrawioPreview.vue').then(m => m.default),
|
||||
supportsEdit: false,
|
||||
}
|
||||
|
||||
registerPreviewHandler(drawioHandler)
|
||||
Reference in New Issue
Block a user