提交 093111e3 编写于 作者: L lang

Component#optionUpdated hook

上级 1c47b8dd
......@@ -114,6 +114,9 @@ define(function(require) {
}
},
// Hooker after init or mergeOption
optionUpdated: function (ecModel) {},
getDefaultOption: function () {
if (!this.hasOwnProperty('__defaultOption')) {
var optList = [];
......
......@@ -166,6 +166,7 @@ define(function (require) {
// ComponentModel.getAllClassMainTypes.
if (!newCptOption) {
componentModel.mergeOption({}, this);
componentModel.optionUpdated(this);
}
else {
var ComponentModelClass = ComponentModel.getClass(
......@@ -174,6 +175,7 @@ define(function (require) {
if (componentModel && componentModel instanceof ComponentModelClass) {
componentModel.mergeOption(newCptOption, this);
componentModel.optionUpdated(this);
}
else {
// PENDING Global as parent ?
......@@ -187,6 +189,8 @@ define(function (require) {
resultItem.keyInfo
)
);
// Call optionUpdated after init
componentModel.optionUpdated(this);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册