import { Component, OnInit } from '@angular/core'; import { Propertiy } from 'src/app/interface/propertiy-interface'; @Component({ selector: 'radio-demo', templateUrl: './radio-demo.component.html' }) export class RadioDemoComponent implements OnInit { binding = 'aa'; binding1 = 'aa'; model = '3'; model1 = 'aa'; radioProperties: Array = [ { name: 'model', value: 'string', type: '@Input()', description: 'radio标识,可做双向绑定[(model)],用于独立使用' }, { name: 'label', value: 'string', type: '@Input()', description: 'radio作为单选组时的标识' }, { name: 'disabled', value: 'boolean', type: '@Input()', description: '禁用,默认false' }, { name: 'modelChange', value: `EventEmitter`, type: '@Output()', description: `触发单选框的回调` } ]; radioGroupProperties: Array = [ { name: 'model', value: 'string', type: '@Input()', description: '选中的单选框值,可以做双向绑定[(model)],内部可放置farris-radio或者farris-radio-button' }, { name: 'name', value: 'string', type: '@Input()', description: '设置radio的name值,默认自动生成' }, { name: 'horizontal', value: `boolean`, type: '@Input()', description: `水平/竖直排列,默认false` }, { name: 'modelChange', value: `EventEmitter`, type: '@Output()', description: `触发单选按钮的回调` } ]; radioButtonProperties: Array = [ { name: 'model', value: 'string', type: '@Input()', description: 'radio标识,可做双向绑定[(model)],用于独立使用' }, { name: 'type', value: "'primary'|'warning'|'danger'|'success'|'link'|'secondary'", type: '@Input()', description: 'radio-button类型,默认secondary' }, { name: 'label', value: 'string', type: '@Input()', description: 'radio作为单选组时的标识' }, { name: 'disabled', value: 'boolean', type: '@Input()', description: '禁用,默认false' }, { name: 'modelChange', value: `EventEmitter`, type: '@Output()', description: `触发单选框的回调` } ]; radiogroupProperties: Array = [ { name: 'data', value: 'Array<{ name: string; value: string}>', type: '@Input()', description: '数据源' }, { name: 'value', value: 'string', type: '@Input()', description: '单选组值,可使用[(ngModel)]实现双向绑定' }, { name: 'disabled', value: 'boolean', type: '@Input()', description: '禁用,默认false' }, { name: 'horizontal', value: `boolean`, type: '@Input()', description: `水平/竖直排列,默认false` }, { name: 'changeValue', value: `EventEmitter`, type: '@Output()', description: `切换单选组变化的回调` } ]; constructor() { } ngOnInit(): void { } }