Gary Tang

Results 1 comments of Gary Tang

在初始创建编辑器的时候判断一下,避免重复的key。这样在重复打开时如果已经存在就不会出现重复key的报错。 ``` const handleCreated = (editor) => { editorRef.value = editor // 注册自定义菜单 放在这里判断是避免重复的 key if(!editor.getAllMenuKeys().includes('YourCustomKeyName')) { const yourCustomeButton = { key: 'YourCustomKeyName', // 定义 menu key :要保证唯一、不重复(重要) factory() {...