【发布时间】:2016-11-16 22:03:48
【问题描述】:
我的 angular2 项目 中有一个 vaadin-grid,其中包含不同的列,例如(列 heder:名字、姓氏、年龄、城市、国家/地区)。我正在尝试隐藏和显示姓氏列的功能。每当我单击 firsname 的列标题时,只有 lastname 列必须在 vaadin-grid 中隐藏/显示。
谁能帮我完成任务。
谢谢。
app.html
<h2>hello</h2>
<vaadin-grid>
<table>
<colgroup>
<col name="Name" click="res()">
<col name="Value">
<col name="Progress" hidable>
</colgroup>
<tbody>
<tr>
<td>Project A</td>
<td>10000</td>
<td>0.8</td>
</tr>
<tr>
<td>Project B</td>
<td>999999</td>
<td>0.8</td>
</tr>
</tbody>
</table>
</vaadin-grid>
app.component.ts
import { Component } from '@angular/core';
import { PolymerElement } from '@vaadin/angular2-polymer';
@Component({
selector: 'my-app',
templateUrl: 'app/app.html',
styles: [`
vaadin-grid {
height: 100%;
}
`],
directives: [
PolymerElement('vaadin-grid')
]
})
export class AppComponent {
res(){
console.log("hi tis is method");
}
}
【问题讨论】:
标签: angular vaadin vaadin-grid