admin管理员组文章数量:1129050
I'm migrating a Nuxt 2 (+ gmap-vue) app to Nuxt 3 (+ @gmap-vue/v3).
Here is the Autocomplete integration (I've stripped some non-relevant attributes):
<GmvAutocomplete>
<template v-slot:default="slotProps">
<Input
ref="input"
:listeners="slotProps.listeners"
:attrs="slotProps.attrs"
/>
</template>
</GmvAutocomplete>
And this is my custom Input
component (or rather it's template):
<template>
<input
:name="name"
:id="name"
ref="input"
:value="modelValue"
@input="handleOnInput"
v-bind="$attrs"
/>
</template>
It throws the following error in the browser's console:
autocomplete-input-CU6sc4MS-HMP3QPYX.js?v=4893d728:57
Uncaught (in promise) Error: we can find the template ref: 'gmvAutoCompleteInput'
or we can't use the slotRef prop
It worked fine in Nuxt 2. What am I missing here?
I've tried adding slotRef='input'
, slotRef='gmvAutoCompleteInput'
and ref='gmvAutoCompleteInput'
to both the parent (<Input />
) and the child (<input />
), but no luck.
本文标签: vuejsCan39t get gmapvuev3 Autocomplete to work with a custom input component on Nuxt 3Stack Overflow
版权声明:本文标题:vue.js - Can't get @gmap-vuev3 Autocomplete to work with a custom input component on Nuxt 3 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736717319a1949271.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论