有没有一种方法可以观察使用使用输入属性的Q-Select的内容?
请问有什么方法可以观看具有使用输入属性的Q输入的文本内容?
我想为地址创建一个自动完成栏。首先,我尝试了分开的Q输入和Q-Select,它起作用了:我观看了Q输入的V模型,并使用它来获取使用自动完整的API的地址建议,然后在Q-Select上显示它们。
但是我想合并Q输入和Q-select,因此我在Q-select中添加了use-Input
,但是现在,当我输入一些文本时,v-Model上的观察器不会触发在Q选择中。那么,如何查看用户类型的每个字符的Q-select内容的内容呢?
我看到的唯一解决方案是保留两个组件,文本输入的Q输入以及选择结果的Q-Select,样式看起来像Q-select具有Q-Select,with use-Input属性:/
谢谢您的帮助:)
Is there a way to watch the text content of a q-input with use-input attribute, please ?
I want to create an autocomplete bar for addresses. First I tried with a separated q-input and q-select and it worked : I watch the v-model of my q-input and I use it to fetch addresses suggestions with my autocomplete API, then I display them on the q-select.
But I want to merge the q-input and q-select, so I added use-input
to my q-select, but now the watcher on its v-model is not triggered when I type some text in the q-select. So how can I watch content of q-select with use-input for every character the user type ?
The only solution I see is to keep the two components, a q-input for text entry, and the q-select for selecting results, with style to look like a q-select with use-input attribute :/
Thank you for your help :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该使用范围a
v-slot
:<模板V-Slot:no-option =“ scope”>
然后,您在模板中有
scope.inputValue
。You should use the scope a the
v-slot
:<template v-slot:no-option="scope">
then you have ur
scope.inputValue
in the template.Finnaly我发现Q-Select有一个 @Input-Value事件
Finnaly I found q-select has an @input-value Event