mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Merge pull request #2093 from knoxHuang/v1.7-release
restore toggleGroup code
This commit is contained in:
@@ -618,8 +618,6 @@ if (CC_DEBUG) {
|
||||
"8301": "Camera does not support Canvas Mode.", //cc.Camera.enabled
|
||||
// AudioEngine: 8400
|
||||
"8400": "Wrong type arguments, 'filePath' must be a String.", // cc.audioEngine.play
|
||||
// ToggleGroup: 8500
|
||||
"8500": "The ToggleGroup.toggleItems api will be removed in v2.0, please obtain toggles in other ways. \uD83D\uDE30",
|
||||
};
|
||||
cc._LogInfos = logs;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,17 @@ 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 () {
|
||||
return this._toggleItems;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
updateToggles: function (toggle) {
|
||||
@@ -112,14 +123,6 @@ var ToggleGroup = cc.Class({
|
||||
start: function () {
|
||||
this._makeAtLeastOneToggleChecked();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
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