Files
railwaysystem/RuoYi-Vue/ruoyi-ui/node_modules1/handsontable/plugins/contextMenu/predefinedItems/undo.mjs
T

24 lines
508 B
JavaScript
Raw Normal View History

2026-09-10 15:40:10 +08:00
import * as C from "../../../i18n/constants.mjs";
export const KEY = 'undo';
/**
* @returns {object}
*/
export default function undoItem() {
return {
key: KEY,
name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_UNDO);
},
callback() {
this.undo();
},
hidden() {
const undoRedo = this.getPlugin('undoRedo');
return !undoRedo || !undoRedo.isEnabled();
},
disabled() {
return !this.getPlugin('undoRedo').isUndoAvailable();
}
};
}