feat: 更新前端UI,增强审计和日志视图功能

This commit is contained in:
caoxiaozhu
2026-05-18 02:51:25 +00:00
parent 35a3783481
commit 9d90bf5299
10 changed files with 3544 additions and 954 deletions

View File

@@ -28,3 +28,28 @@ export function buildOnlyOfficePreviewConfig(config, options = {}) {
height: `${clampHeight(viewportHeight)}px`
}
}
export function buildOnlyOfficeEditorConfig(config, options = {}) {
const viewportHeight = options.viewportHeight
const editable = Boolean(options.editable)
const fillContainer = Boolean(options.fillContainer)
return {
...config,
type: editable ? 'desktop' : 'embedded',
editorConfig: {
...(config.editorConfig || {}),
embedded: editable
? undefined
: {
embedUrl: '',
fullscreenUrl: '',
saveUrl: '',
shareUrl: '',
toolbarDocked: 'top'
}
},
width: '100%',
height: fillContainer ? '100%' : `${clampHeight(viewportHeight)}px`
}
}