This commit is contained in:
街角小林
2024-01-11 18:02:30 +08:00
parent b5cfca848a
commit 836a335d75
2 changed files with 7 additions and 2 deletions

View File

@@ -329,7 +329,8 @@ export const ERROR_TYPES = {
LOAD_CLIPBOARD_IMAGE_ERROR: 'load_clipboard_image_error',
BEFORE_TEXT_EDIT_ERROR: 'before_text_edit_error',
EXPORT_ERROR: 'export_error',
EXPORT_LOAD_IMAGE_ERROR: 'export_load_image_error'
EXPORT_LOAD_IMAGE_ERROR: 'export_load_image_error',
DATA_CHANGE_DETAIL_EVENT_ERROR: 'data_change_detail_event_error'
}
// css

View File

@@ -5,6 +5,7 @@ import {
isSameObject,
transformTreeDataToObject
} from '../../utils'
import { ERROR_TYPES } from '../../constants/constant'
// 命令类
class Command {
@@ -225,7 +226,10 @@ class Command {
this.mindMap.emit(eventName, res)
}
} catch (error) {
this.mindMap.opt.errorHandler && this.mindMap.opt.errorHandler(error)
this.mindMap.opt.errorHandler(
ERROR_TYPES.DATA_CHANGE_DETAIL_EVENT_ERROR,
error
)
}
}
}