2
0
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:
Rajesh Akkineni
2016-10-20 09:08:26 +05:30
parent b2c201dde9
commit ee423394e3
5 changed files with 9 additions and 10 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -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">&times;</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>
-1
View File
@@ -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 */
+5 -5
View File
@@ -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
},
}
}