UNPKG

@gaonengwww/tiny-toolkit-docs

Version:

这里对你的套件进行简单描述, 比如适用哪些场景,使用了什么技术, 有什么特点

49 lines (47 loc) 954 B
import { Component } from '@angular/core'; import { TiButtonItem } from '@opentiny/ng'; @Component({ templateUrl: './buttongroup-event.html', }) export class ButtongroupEventComponent { items: Array<TiButtonItem> = [ { text: '星期一', }, { text: '星期二', }, { text: '星期三', }, { text: '星期四', }, ]; items1: Array<TiButtonItem> = [ { text: '1G', }, { text: '2G', }, { text: '3G', }, { text: '4G', }, ]; selected: TiButtonItem = this.items[1]; selected1: Array<TiButtonItem> = [this.items1[3]]; myLogs: Array<any> = []; focus(): void { this.myLogs = [...this.myLogs, 'focus']; } blur(): void { this.myLogs = [...this.myLogs, 'blur']; } modelChange($event: TiButtonItem): void { this.myLogs = [...this.myLogs, JSON.stringify($event)]; } }