mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
chore(radio): add more types
This commit is contained in:
@ -47,8 +47,8 @@ import {RadioGroup} from './radio-group';
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
export class RadioButton {
|
export class RadioButton {
|
||||||
private _checked: any = false;
|
private _checked: boolean = false;
|
||||||
private _disabled: any = false;
|
private _disabled: boolean = false;
|
||||||
private _labelId: string;
|
private _labelId: string;
|
||||||
private _value = null;
|
private _value = null;
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ export class RadioButton {
|
|||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @output {any} expression to be evaluated when clicked
|
* @output {RadioButton} expression to be evaluated when selected
|
||||||
*/
|
*/
|
||||||
@Output() select: EventEmitter<RadioButton> = new EventEmitter();
|
@Output() select: EventEmitter<RadioButton> = new EventEmitter();
|
||||||
|
|
||||||
@ -100,11 +100,11 @@ export class RadioButton {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
get checked() {
|
get checked(): boolean {
|
||||||
return this._checked;
|
return this._checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
set checked(isChecked) {
|
set checked(isChecked: boolean) {
|
||||||
this._checked = isTrueProperty(isChecked);
|
this._checked = isTrueProperty(isChecked);
|
||||||
|
|
||||||
if (this._item) {
|
if (this._item) {
|
||||||
@ -116,11 +116,11 @@ export class RadioButton {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
get disabled() {
|
get disabled(): boolean {
|
||||||
return this._disabled;
|
return this._disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
set disabled(val) {
|
set disabled(val: boolean) {
|
||||||
this._disabled = isTrueProperty(val);
|
this._disabled = isTrueProperty(val);
|
||||||
this._item && this._item.setCssClass('item-radio-disabled', this._disabled);
|
this._item && this._item.setCssClass('item-radio-disabled', this._disabled);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user