4fcc92a381
2. 合同模板对比接入monaco editor的效果。 3. 添加交叉评查的案卷类型的数据查询。 fix: 1. 修复文档列表的打开模态框蒙板层显示效果。
38 lines
841 B
TypeScript
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,
|
|
},
|
|
});
|
|
}
|