ng-ytl-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
55 lines (48 loc) • 1.38 kB
text/typescript
import {
Component,
HostBinding,
Input,
OnInit,
ViewEncapsulation,
} from '@angular/core';
import { toBoolean } from '../util/convert';
import { NzRadioComponent } from './nz-radio.component';
export class NzRadioButtonComponent extends NzRadioComponent implements OnInit {
_checked = false;
_disabled = false;
_prefixCls = 'ant-radio-button';
_innerPrefixCls = `${this._prefixCls}-inner`;
_inputPrefixCls = `${this._prefixCls}-input`;
set nzDisabled(value: boolean) {
this._disabled = toBoolean(value);
this.setClassMap();
}
get nzDisabled(): boolean {
return this._disabled;
}
set nzChecked(value: boolean) {
this._checked = toBoolean(value);
this.setClassMap();
}
get nzChecked(): boolean {
return this._checked;
}
}