optimize Slider when dragging can select content in page

optimize Slider when dragging can select content in page
This commit is contained in:
梁灏 2016-11-11 18:28:13 +08:00
parent 73772536d6
commit f2be585e5e
2 changed files with 4 additions and 0 deletions

View file

@ -253,6 +253,7 @@
// for single use
onSingleButtonDown (event) {
if (this.disabled) return;
event.preventDefault();
this.onSingleDragStart(event);
window.addEventListener('mousemove', this.onSingleDragging);
window.addEventListener('mouseup', this.onSingleDragEnd);
@ -306,6 +307,7 @@
// for range use first
onFirstButtonDown (event) {
if (this.disabled) return;
event.preventDefault();
this.onFirstDragStart(event);
window.addEventListener('mousemove', this.onFirstDragging);
window.addEventListener('mouseup', this.onFirstDragEnd);
@ -354,6 +356,7 @@
// for range use second
onSecondButtonDown (event) {
if (this.disabled) return;
event.preventDefault();
this.onSecondDragStart(event);
window.addEventListener('mousemove', this.onSecondDragging);
window.addEventListener('mouseup', this.onSecondDragEnd);

View file

@ -8,6 +8,7 @@
<!--<Slider :step="13"></Slider>-->
<!--<Slider :step="13" :max="60"></Slider>-->
<Icon type="checkmark-circled" size="40" color="#f60"></Icon>
<p>附近的首付款是东方红看就是</p>
</div>
</template>
<script>