移动滑块表时,角度2闪烁

时间:2016-04-27 05:10:38

标签: jquery slider angular

我正在移动一个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>

0 个答案:

没有答案