From a7eb66a6c9975dcdef1feda1132d690b823fcb42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A1=97=E8=A7=92=E5=B0=8F=E6=9E=97?= <1013335014@qq.com> Date: Thu, 17 Oct 2024 11:32:35 +0800 Subject: [PATCH] =?UTF-8?q?Feat=EF=BC=9Aafter=5Fupdate=5Fconfig=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=96=B0=E5=A2=9E=E4=B8=8A=E4=B8=80=E6=AC=A1=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E8=BF=94=E5=9B=9E=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/simple-mind-map/index.js b/simple-mind-map/index.js index 41a0ded9..d2098136 100644 --- a/simple-mind-map/index.js +++ b/simple-mind-map/index.js @@ -339,8 +339,11 @@ class MindMap { // 更新配置 updateConfig(opt = {}) { this.emit('before_update_config', this.opt) + const lastOpt = { + ...this.opt + } this.opt = this.handleOpt(merge.all([defaultOpt, this.opt, opt])) - this.emit('after_update_config', this.opt) + this.emit('after_update_config', this.opt, lastOpt) } // 获取当前布局结构