@data-fair/lib-vuetify 1.12.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/search-address.vue +24 -23
- package/search-address.vue.d.ts +1 -1
- package/search-address.vue.js +0 -2
package/package.json
CHANGED
package/search-address.vue
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-autocomplete
|
|
3
|
+
v-model="address"
|
|
4
|
+
:items="addressesList"
|
|
5
|
+
:loading="loadingAddresses"
|
|
6
|
+
no-filter
|
|
7
|
+
:clearable="true"
|
|
8
|
+
return-object
|
|
9
|
+
hide-no-data
|
|
10
|
+
hide-details
|
|
11
|
+
label="Adresse"
|
|
12
|
+
placeholder="Saisissez une adresse"
|
|
13
|
+
:variant="variant"
|
|
14
|
+
density="compact"
|
|
15
|
+
menu-icon=""
|
|
16
|
+
@update:search="(search: string) => findAdresses(search)"
|
|
17
|
+
/>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
|
|
1
21
|
<script setup lang="ts">
|
|
2
|
-
import { VAutocomplete } from 'vuetify/components/VAutocomplete'
|
|
22
|
+
import type { VAutocomplete } from 'vuetify/components/VAutocomplete'
|
|
3
23
|
import { ref, watch } from 'vue'
|
|
4
24
|
import { ofetch } from 'ofetch'
|
|
5
25
|
import { useDebounceFn } from '@vueuse/core'
|
|
@@ -8,9 +28,9 @@ defineProps<{variant?: VAutocomplete['variant']}>()
|
|
|
8
28
|
const emit = defineEmits(['selected'])
|
|
9
29
|
const model = defineModel({ type: String })
|
|
10
30
|
|
|
11
|
-
const addressesList = ref
|
|
31
|
+
const addressesList = ref<any[]>([])
|
|
12
32
|
const loadingAddresses = ref(false)
|
|
13
|
-
const address = ref(null
|
|
33
|
+
const address = ref<any>(null)
|
|
14
34
|
|
|
15
35
|
const findAdressesFn = async (search: string, selectedId?: string) => {
|
|
16
36
|
loadingAddresses.value = true
|
|
@@ -53,23 +73,4 @@ watch(
|
|
|
53
73
|
emit('selected', addr ? addr.value : undefined)
|
|
54
74
|
}
|
|
55
75
|
)
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
<template>
|
|
59
|
-
<v-autocomplete
|
|
60
|
-
v-model="address"
|
|
61
|
-
:items="addressesList"
|
|
62
|
-
:loading="loadingAddresses"
|
|
63
|
-
no-filter
|
|
64
|
-
:clearable="true"
|
|
65
|
-
return-object
|
|
66
|
-
hide-no-data
|
|
67
|
-
hide-details
|
|
68
|
-
label="Adresse"
|
|
69
|
-
placeholder="Saisissez une adresse"
|
|
70
|
-
:variant="variant"
|
|
71
|
-
density="compact"
|
|
72
|
-
menu-icon=""
|
|
73
|
-
@update:search="(search: string) => findAdresses(search)"
|
|
74
|
-
/>
|
|
75
|
-
</template>
|
|
76
|
+
</script>
|
package/search-address.vue.d.ts
CHANGED
package/search-address.vue.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types=".vue-global-types/vue_3.5_false.d.ts" />
|
|
2
|
-
import { VAutocomplete } from 'vuetify/components/VAutocomplete';
|
|
3
2
|
import { ref, watch } from 'vue';
|
|
4
3
|
import { ofetch } from 'ofetch';
|
|
5
4
|
import { useDebounceFn } from '@vueuse/core';
|
|
@@ -98,7 +97,6 @@ function __VLS_template() {
|
|
|
98
97
|
const __VLS_self = (await import('vue')).defineComponent({
|
|
99
98
|
setup() {
|
|
100
99
|
return {
|
|
101
|
-
VAutocomplete: VAutocomplete,
|
|
102
100
|
addressesList: addressesList,
|
|
103
101
|
loadingAddresses: loadingAddresses,
|
|
104
102
|
address: address,
|