adjust the toggleItems code and remove toggleItems api

This commit is contained in:
knoxHuang
2017-10-23 16:35:26 +08:00
parent f1fee91b90
commit 9c8d7b1d21
+7 -12
View File
@@ -54,18 +54,6 @@ var ToggleGroup = cc.Class({
tooltip: CC_DEV && 'i18n:COMPONENT.toggle_group.allowSwitchOff',
default: false
},
/**
* !#en Read only property, return the toggle items array reference managed by toggleGroup.
* !#zh 只读属性,返回 toggleGroup 管理的 toggle 数组引用
* @property {Array} toggleItems
*/
toggleItems: {
get: function () {
cc.warnID(8500);
return this._toggleItems;
}
}
},
updateToggles: function (toggle) {
@@ -127,4 +115,11 @@ var ToggleGroup = cc.Class({
});
var JS = require('../platform/js');
JS.get(ToggleGroup.prototype, 'toggleItems', function () {
cc.warnID(8500);
return this._toggleItems;
});
cc.ToggleGroup = module.exports = ToggleGroup;