@volverjs/ui-vue 0.0.6 → 0.0.7-beta.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/dist/components/VvCombobox/VvCombobox.es.js +29 -25
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/index.es.js +29 -25
- package/dist/components/index.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/package.json +26 -25
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvCombobox/VvCombobox.vue +21 -18
- package/src/components/VvDropdown/VvDropdown.vue +5 -1
|
@@ -160,14 +160,10 @@
|
|
|
160
160
|
dirty: isDirty.value,
|
|
161
161
|
focus: focused.value,
|
|
162
162
|
floating: floating.value,
|
|
163
|
+
badges: props.badges,
|
|
163
164
|
})),
|
|
164
165
|
)
|
|
165
166
|
|
|
166
|
-
// current options, filtered or prop options
|
|
167
|
-
const hasOptions = computed(() =>
|
|
168
|
-
props.searchable ? filteredOptions.value : props.options,
|
|
169
|
-
)
|
|
170
|
-
|
|
171
167
|
const {
|
|
172
168
|
getOptionLabel,
|
|
173
169
|
getOptionValue,
|
|
@@ -302,7 +298,7 @@
|
|
|
302
298
|
disabled: disabled.value,
|
|
303
299
|
readonly: readonly.value,
|
|
304
300
|
modifiers: props.modifiers,
|
|
305
|
-
options:
|
|
301
|
+
options: props.options,
|
|
306
302
|
labelKey: props.labelKey,
|
|
307
303
|
valueKey: props.valueKey,
|
|
308
304
|
icon: props.icon,
|
|
@@ -339,16 +335,20 @@
|
|
|
339
335
|
}))
|
|
340
336
|
|
|
341
337
|
// computed
|
|
342
|
-
onKeyStroke(
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
338
|
+
onKeyStroke(
|
|
339
|
+
[' ', 'Enter'],
|
|
340
|
+
(e) => {
|
|
341
|
+
if (props.autoOpen) {
|
|
342
|
+
return
|
|
343
|
+
}
|
|
344
|
+
if (!expanded.value && focused.value) {
|
|
345
|
+
e.preventDefault()
|
|
346
|
+
e.stopImmediatePropagation()
|
|
347
|
+
toggleExpanded()
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
{ target: inputEl },
|
|
351
|
+
)
|
|
352
352
|
</script>
|
|
353
353
|
|
|
354
354
|
<template>
|
|
@@ -422,9 +422,12 @@
|
|
|
422
422
|
v-bind="{ selectedOptions, onInput }"
|
|
423
423
|
>
|
|
424
424
|
<template v-if="hasValue">
|
|
425
|
-
<
|
|
425
|
+
<div
|
|
426
|
+
v-if="!badges"
|
|
427
|
+
class="vv-select__value"
|
|
428
|
+
>
|
|
426
429
|
{{ hasValue }}
|
|
427
|
-
</
|
|
430
|
+
</div>
|
|
428
431
|
<VvBadge
|
|
429
432
|
v-for="(
|
|
430
433
|
option, index
|
|
@@ -334,7 +334,11 @@
|
|
|
334
334
|
}
|
|
335
335
|
})
|
|
336
336
|
onKeyStroke([' ', 'Enter'], (e) => {
|
|
337
|
-
if (
|
|
337
|
+
if (
|
|
338
|
+
expanded.value &&
|
|
339
|
+
focused.value &&
|
|
340
|
+
e.target !== document.activeElement
|
|
341
|
+
) {
|
|
338
342
|
e.preventDefault()
|
|
339
343
|
const activeElement = document.activeElement as HTMLElement
|
|
340
344
|
activeElement.click()
|