Feat:after_update_config事件新增上一次配置的返回参数

This commit is contained in:
街角小林 2024-10-17 11:32:35 +08:00
parent e24fd9bdbb
commit a7eb66a6c9

View File

@ -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)
}
// 获取当前布局结构