作者:蓝月亮乐悠悠 | 来源:互联网 | 2023-09-14 18:43
我只是想$refs
在我的 Vue 3 应用程序中使用,但我一直收到 Typescript 错误Object is of type 'unknown'
。我不知道如何解决这个问题。
这是我的 .vue 文件:
Add Products
mode="tags"
placeholder="Select one or more products..."
ref="multi"
:searchable="true"
:createTag="true"
:optiOns="options"> v-bind:key="index"
v-bind:name="product">
线this.$refs.multi.deselect(product)
在removeProduct
函数是一个生产误差。
这是通过文档指示使用它的方式:
mounted() {
this.$refs.multiselect.open()
}