feat: 更新前端UI,增强审计和日志视图功能
This commit is contained in:
@@ -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`
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user