UNPKG

@gaonengwww/tiny-toolkit-docs

Version:

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

52 lines (48 loc) 1.26 kB
import { Component, TemplateRef, ViewChild } from '@angular/core'; import { TiButtonItem } from '@opentiny/ng'; @Component({ templateUrl: './buttongroup-tip.html', }) export class ButtongroupTipComponent { @ViewChild('tip', { static: true }) tip: TemplateRef<any>; items: Array<TiButtonItem> = []; items1: Array<TiButtonItem> = []; selected: TiButtonItem; selected1: Array<TiButtonItem>; ngOnInit(): void { this.items = [ { text: '配置提示内容', tipContent: this.tip, tipPosition: 'top-left', }, { text: '配置提示内容', tipContent: 'string类型的提示', tipPosition: 'left', }, { text: '禁用且配置提示内容', disabled: true, tipContent: this.tip, }, ]; this.items1 = [ { text: '配置提示内容', tipContent: 'string类型的提示', }, { text: '配置提示内容', tipContent: this.tip, }, { text: '禁用且配置提示内容', disabled: true, tipContent: this.tip, }, ]; this.selected = this.items[1]; this.selected1 = [this.items1[1]]; } }