2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-07 07:12:23 +03:00

build(vite): replace webpack with Vite, add Typescript (#1594)

BREAKING: mixins are no longer exported from the index (and will likely be converted to hooks)
This commit is contained in:
Jeff Sagal
2022-07-18 09:33:46 -07:00
committed by GitHub
parent 92abcbf1f8
commit 98c278b2bb
51 changed files with 3470 additions and 10062 deletions
+11 -11
View File
@@ -136,13 +136,13 @@
</template>
<script>
import pointerScroll from '../mixins/pointerScroll'
import typeAheadPointer from '../mixins/typeAheadPointer'
import ajax from '../mixins/ajax'
import childComponents from './childComponents'
import appendToBody from '../directives/appendToBody'
import sortAndStringify from '../utility/sortAndStringify'
import uniqueId from '../utility/uniqueId'
import pointerScroll from '@/mixins/pointerScroll.js'
import typeAheadPointer from '@/mixins/typeAheadPointer.js'
import ajax from '@/mixins/ajax.js'
import childComponents from '@/components/childComponents.js'
import appendToBody from '@/directives/appendToBody.js'
import sortAndStringify from '@/utility/sortAndStringify.js'
import uniqueId from '@/utility/uniqueId.js'
/**
* @name VueSelect
@@ -722,7 +722,7 @@ export default {
value = this.$data._value
}
if (value !== undefined && value !== null) {
if (value !== undefined && value !== null && value !== '') {
return [].concat(value)
}
@@ -745,7 +745,7 @@ export default {
* @returns {HTMLInputElement}
*/
searchEl() {
return !!this.$slots['search']
return this.$slots['search']
? this.$refs.selectedOptions.querySelector(
this.searchInputQuerySelector
)
@@ -890,7 +890,7 @@ export default {
return optionList
}
let options = this.search.length
const options = this.search.length
? this.filter(optionList, this.search, this)
: optionList
if (this.taggable && this.search.length) {
@@ -930,7 +930,7 @@ export default {
* @return {[type]} [description]
*/
options(newOptions, oldOptions) {
let shouldReset = () =>
const shouldReset = () =>
typeof this.resetOnOptionsChange === 'function'
? this.resetOnOptionsChange(
newOptions,
+2 -2
View File
@@ -1,5 +1,5 @@
import Deselect from './Deselect'
import OpenIndicator from './OpenIndicator'
import Deselect from './Deselect.vue'
import OpenIndicator from './OpenIndicator.vue'
export default {
Deselect,
-2
View File
@@ -1,5 +1,3 @@
import VueSelect from './components/Select.vue'
import mixins from './mixins/index'
export default VueSelect
export { VueSelect, mixins }
+3 -3
View File
@@ -1,5 +1,5 @@
import ajax from './ajax'
import pointer from './typeAheadPointer'
import pointerScroll from './pointerScroll'
import ajax from '@/mixins/ajax.js'
import pointer from '@/mixins/typeAheadPointer.js'
import pointerScroll from '@/mixins/pointerScroll.js'
export default { ajax, pointer, pointerScroll }