Files
leaudit-platform-frontend/app/components/collabora/lib/zoom.ts
T
LiangShiyong 4fcc92a381 feat: 1. 接入CollaboraViewer选中的高亮效果,清除高亮功能,页面销毁自动清除高亮。
2. 合同模板对比接入monaco editor的效果。
3. 添加交叉评查的案卷类型的数据查询。

fix: 1. 修复文档列表的打开模态框蒙板层显示效果。
2025-11-30 19:33:05 +08:00

38 lines
841 B
TypeScript

/**
* Collabora Online 缩放功能
*
* @encoding UTF-8
*/
import { sendUnoCommand } from '../Uno';
/**
* 放大文档
* @param iframeWindow - iframe 的 contentWindow
*/
export function unoZoomIn(iframeWindow: Window): void {
sendUnoCommand(iframeWindow, '.uno:ZoomPlus');
}
/**
* 缩小文档
* @param iframeWindow - iframe 的 contentWindow
*/
export function unoZoomOut(iframeWindow: Window): void {
sendUnoCommand(iframeWindow, '.uno:ZoomMinus');
}
/**
* 设置缩放比例
* @param iframeWindow - iframe 的 contentWindow
* @param percentage - 缩放比例(例如:100 表示 100%)
*/
export function unoSetZoom(iframeWindow: Window, percentage: number): void {
sendUnoCommand(iframeWindow, '.uno:Zoom', {
Zoom: {
type: 'long',
value: percentage,
},
});
}