每当我点击或拖动滑块时,表格的内容都会闪烁,有时值也会自动变化; 我错过了什么?
ngAfterViewInit() {
this.sliderElt = $(this.elementRef.nativeElement).find('.slider');
this.sliderElt.slider({
range: true,
orientation: "horizontal",
min: 1,
max: 100,
step: 1,
values: this.value,
slide: (event, ui) => {
this.onChange(ui.values);
},
change: (event, ui) => {
console.log('change');
}
});
和Angular 2部分,
<tbody>
<tr *ngFor="#x of data">
<td>
<span>{{x.NUMBER}}</span>
</td>
<td>{{x.DETAIL}}</td>
<td>{{x.DATE}}</td>
</tr>
</tbody>