|
|
@@ -1,5 +1,6 @@
|
|
|
import { CellCoords } from './../3rdparty/walkontable/src';
|
|
|
import { stringify } from './../helpers/mixed';
|
|
|
+import EditorManager from './../editorManager';
|
|
|
|
|
|
export const EditorState = {
|
|
|
VIRGIN: 'STATE_VIRGIN', // before editing
|
|
|
@@ -266,4 +267,22 @@ BaseEditor.prototype.checkEditorSection = function() {
|
|
|
return section;
|
|
|
};
|
|
|
|
|
|
+// 锁定editor,锁定后,点击事件不会关闭editor
|
|
|
+BaseEditor.prototype.lock = function() {
|
|
|
+ const editorManagerInstance = EditorManager.getInstance(this.instance);
|
|
|
+ editorManagerInstance.lockEditor();
|
|
|
+};
|
|
|
+
|
|
|
+// 解锁editor
|
|
|
+BaseEditor.prototype.unlock = function() {
|
|
|
+ const editorManagerInstance = EditorManager.getInstance(this.instance);
|
|
|
+ editorManagerInstance.unlockEditor();
|
|
|
+};
|
|
|
+
|
|
|
+// 获取editor是否锁定
|
|
|
+BaseEditor.prototype.getLockState = function() {
|
|
|
+ const editorManagerInstance = EditorManager.getInstance(this.instance);
|
|
|
+ return editorManagerInstance.getLockState();
|
|
|
+};
|
|
|
+
|
|
|
export default BaseEditor;
|