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:
+11
-11
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import VueSelect from './components/Select.vue'
|
||||
import mixins from './mixins/index'
|
||||
|
||||
export default VueSelect
|
||||
export { VueSelect, mixins }
|
||||
|
||||
+3
-3
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user