Feat:after_update_config事件新增上一次配置的返回参数
This commit is contained in:
parent
e24fd9bdbb
commit
a7eb66a6c9
@ -339,8 +339,11 @@ class MindMap {
|
|||||||
// 更新配置
|
// 更新配置
|
||||||
updateConfig(opt = {}) {
|
updateConfig(opt = {}) {
|
||||||
this.emit('before_update_config', this.opt)
|
this.emit('before_update_config', this.opt)
|
||||||
|
const lastOpt = {
|
||||||
|
...this.opt
|
||||||
|
}
|
||||||
this.opt = this.handleOpt(merge.all([defaultOpt, this.opt, 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)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前布局结构
|
// 获取当前布局结构
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user