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

wip - install vite

w/ typescript, vitest, eslint, prettier
This commit is contained in:
Jeff Sagal
2022-02-17 21:46:05 -08:00
parent 7a3b373d43
commit 2ac879ed28
24 changed files with 1768 additions and 6883 deletions
+11
View File
@@ -0,0 +1,11 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'
import HelloWorld from '../HelloWorld.vue'
describe('HelloWorld', () => {
it('renders properly', () => {
const wrapper = mount(HelloWorld, { props: { msg: 'Hello Vitest' } })
expect(wrapper.text()).toContain('Hello Vitest')
})
})
+10 -10
View File
@@ -34,7 +34,7 @@
<button
v-if="multiple"
ref="deselectButtons"
:ref="el => deselectButtons[i] = el"
:ref="(el) => (deselectButtons[i] = el)"
:disabled="disabled"
type="button"
class="vs__deselect"
@@ -137,13 +137,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
@@ -694,7 +694,7 @@ export default {
pushedTags: [],
// eslint-disable-next-line vue/no-reserved-keys
_value: [], // Internal value managed by Vue Select if no `value` prop is passed
deselectButtons: []
deselectButtons: [],
}
},
@@ -746,7 +746,7 @@ export default {
* @returns {HTMLInputElement}
*/
searchEl() {
return !!this.$slots['search']
return this.$slots['search']
? this.$refs.selectedOptions.querySelector(
this.searchInputQuerySelector
)
+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,
+1 -1
View File
@@ -1,5 +1,5 @@
import VueSelect from './components/Select.vue'
import mixins from './mixins/index'
import mixins from './mixins/index.js'
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 }