我正在移动一个jQuery滑块,但表中的内容是闪烁的。每当鼠标滑过滑块时,它就会闪烁。我现在应该怎么做?
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');
}
});
//$(this.elementRef.nativeElement).find('.slider').slider('value', this.value);
this.initialized = true;
}
writeValue(value: any): void {
if (value != null) {
//super.writeValue(value.toString());
console.log('this.initialized = ' + this.initialized);
if (this.initialized) {
console.log('value = ' + value);
this.sliderElt.slider('values', value);
} else {
this.value = value;
}
}
}
registerOnChange(fn: (_: any) => void): void { this.onChange = fn; }
registerOnTouched(fn: () => void): void { this.onTouched = fn; }
}
我的表格内容在这里:
<tbody>
<tr *ngFor="#x of data">
<td>
<span>{{x.NUMBER}}</span>
</td>
<td>{{x.DETAIL}}</td>
<td>{{x.DATE}}</td>
</tr>
</tbody>