mylomen-server/static/js/event/impl/CancelEventImpl.js
shaoyongjun 0bd5a87973 to:sync
2024-11-05 22:43:34 +08:00

26 lines
671 B
JavaScript

"use strict";
/**
* 撤销事件
*/
define(function (require, exports, module) {
function handle(e) {
const utils = require('../../common/utils');
const ctx = require('../../common/ctx');
let event = utils.ParseEvent(e);
console.log('触发ctrl + Z 事件', event.target)
if (ctx.latestOpDoc !== undefined && ctx.latestOpDoc !== null) {
//恢复
ctx.latestOpDoc.recovery();
//测试展示
ctx.showTestText()
//阻止事件
utils.ProhibitDefaultEvent(event);
}
ctx.latestOpDoc = null
}
//导出
exports.handle = handle;
});