mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-07 07:12:23 +03:00
Fixed more issues reported by vue-migration-helper
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -174,7 +174,7 @@
|
||||
<div class="dropdown v-select" :class="dropdownClasses">
|
||||
<div ref="toggle" @mousedown.prevent="toggleDropdown" class="dropdown-toggle clearfix" type="button">
|
||||
|
||||
<span class="selected-tag" v-for="(option, index) in valueAsArray" track-by="index">
|
||||
<span class="selected-tag" v-for="option in valueAsArray" v-bind:key="index">
|
||||
{{ getOptionLabel(option) }}
|
||||
<button v-if="multiple" @click="select(option)" type="button" class="close">
|
||||
<span aria-hidden="true">×</span>
|
||||
@@ -207,7 +207,7 @@
|
||||
</div>
|
||||
|
||||
<ul ref="dropdown-menu" v-show="open" :transition="transition" class="dropdown-menu" :style="{ 'max-height': maxHeight }">
|
||||
<li v-for="(option, index) in filteredOptions" track-by="index" :class="{ active: isOptionSelected(option), highlight: index === typeAheadPointer }" @mouseover="typeAheadPointer = index">
|
||||
<li v-for="(option, index) in filteredOptions" v-bind:key="index" :class="{ active: isOptionSelected(option), highlight: index === typeAheadPointer }" @mouseover="typeAheadPointer = index">
|
||||
<a @mousedown.prevent="select(option)">
|
||||
{{ getOptionLabel(option) }}
|
||||
</a>
|
||||
|
||||
@@ -3,7 +3,6 @@ import vSelect from '../src/components/Select.vue'
|
||||
|
||||
Vue.component('v-select', vSelect)
|
||||
|
||||
Vue.config.debug = true
|
||||
Vue.config.devtools = true
|
||||
|
||||
/* eslint-disable no-new */
|
||||
|
||||
@@ -31,7 +31,7 @@ module.exports = {
|
||||
pixelsToPointerTop() {
|
||||
let pixelsToPointerTop = 0
|
||||
for (let i = 0; i < this.typeAheadPointer; i++) {
|
||||
pixelsToPointerTop += this.$els.dropdownMenu.children[i].offsetHeight
|
||||
pixelsToPointerTop += this.$refs.dropdownMenu.children[i].offsetHeight
|
||||
}
|
||||
return pixelsToPointerTop
|
||||
},
|
||||
@@ -50,7 +50,7 @@ module.exports = {
|
||||
* @returns {number}
|
||||
*/
|
||||
pointerHeight() {
|
||||
let element = this.$els.dropdownMenu.children[this.typeAheadPointer]
|
||||
let element = this.$refs.dropdownMenu.children[this.typeAheadPointer]
|
||||
return element ? element.offsetHeight : 0
|
||||
},
|
||||
|
||||
@@ -60,8 +60,8 @@ module.exports = {
|
||||
*/
|
||||
viewport() {
|
||||
return {
|
||||
top: this.$els.dropdownMenu.scrollTop,
|
||||
bottom: this.$els.dropdownMenu.offsetHeight + this.$els.dropdownMenu.scrollTop
|
||||
top: this.$refs.dropdownMenu.scrollTop,
|
||||
bottom: this.$refs.dropdownMenu.offsetHeight + this.$refs.dropdownMenu.scrollTop
|
||||
}
|
||||
},
|
||||
|
||||
@@ -71,7 +71,7 @@ module.exports = {
|
||||
* @returns {*}
|
||||
*/
|
||||
scrollTo(position) {
|
||||
return this.$els.dropdownMenu.scrollTop = position
|
||||
return this.$refs.dropdownMenu.scrollTop = position
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user