Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<div
ref="wrap"
:id="id"
class="vue-slide-bar-component vue-slide-bar-horizontal"
:style="calculateHeight"
@click="wrapClick">
Expand Down Expand Up @@ -87,10 +86,6 @@ export default {
type: Array,
default: null
},
id: {
type: String,
default: 'wrap'
},
range: {
type: Array,
default: null
Expand Down Expand Up @@ -245,7 +240,7 @@ export default {
return e.clientX - this.offset
},
wrapClick (e) {
if (this.isDisabled || (!this.draggable && e.target.id === this.id)) return false
if (this.isDisabled || (!this.draggable && e.target === this.$refs.wrap)) return false
let pos = this.getPos(e)
this.setValueOnPos(pos)
},
Expand Down Expand Up @@ -404,7 +399,7 @@ export default {
}
</script>

<style scoped>
<style>
.vue-slide-bar-component {
position: relative;
box-sizing: border-box;
Expand Down Expand Up @@ -462,7 +457,6 @@ export default {
}
.vue-slide-bar-tooltip {
position: relative;
font-size: 14px;
white-space: nowrap;
padding: 2px 5px;
min-width: 20px;
Expand Down