@veritree/ui 0.28.0-1 → 0.28.1-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
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
v-model="search"
|
|
6
6
|
v-bind="$attrs"
|
|
7
7
|
type="text"
|
|
8
|
-
class="leading-0
|
|
8
|
+
class="leading-0 font-inherit hidden w-full max-w-full appearance-none border-b border-solid border-gray-300 px-3 py-2 text-base text-inherit sm:block"
|
|
9
9
|
@input="onChange"
|
|
10
10
|
@click.stop
|
|
11
11
|
@keydown.down.prevent="focusNextItem"
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
|
|
30
30
|
inheritAttrs: false,
|
|
31
31
|
|
|
32
|
-
emits: ['change'],
|
|
32
|
+
emits: ['change', 'update:modelValue'],
|
|
33
33
|
|
|
34
34
|
inject: ['apiListbox'],
|
|
35
35
|
|
|
@@ -126,9 +126,12 @@ export default {
|
|
|
126
126
|
},
|
|
127
127
|
|
|
128
128
|
onChange() {
|
|
129
|
-
|
|
129
|
+
const value = this.search.trim();
|
|
130
|
+
this.$emit('change', value);
|
|
131
|
+
this.$emit('update:modelValue', value);
|
|
130
132
|
|
|
131
133
|
this.$nextTick(() => {
|
|
134
|
+
if (!this.items.length) return;
|
|
132
135
|
this.index = 0;
|
|
133
136
|
if (this.item) this.item.select();
|
|
134
137
|
});
|