From 48b23ee5636ad6f59b41e23253f926c6534b4c8d Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Fri, 21 May 2021 09:47:14 +0800 Subject: [PATCH] type: Fix type errors. --- src/components/CodeMirror/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CodeMirror/index.tsx b/src/components/CodeMirror/index.tsx index b408663c..f1642a9e 100644 --- a/src/components/CodeMirror/index.tsx +++ b/src/components/CodeMirror/index.tsx @@ -151,7 +151,7 @@ export default class ReactCodeMirror extends Component { const handle = this.props[event]; - this.editor.on(eventDict[event], handle); + this.editor.on(eventDict[event] as keyof CodeMirror.EditorEventMap, handle); }); // Init value this.editor.setValue(value || '');