mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
adjust the toggleItems code and remove toggleItems api
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user