为什么在使用Flicking软件包时发送此错误消息?
我正在使用 flicking软件包&闪烁的组件可以很好地创建旋转频率,但是每当我尝试移动(Flick)的一个儿童组件之一时,闪烁的组件会产生错误,如下所示。
Flicking.ts:58 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'key')
at Flicking.ts:58:19
at Array.map (<anonymous>)
at getPanels (Flicking.ts:57:28)
at normalizeChildren (runtime-core.esm-bundler.js:6408:42)
at createBaseVNode (runtime-core.esm-bundler.js:6170:9)
at _createVNode (runtime-core.esm-bundler.js:6263:12)
at createVNodeWithArgsTransform (runtime-core.esm-bundler.js:6128:12)
at h (runtime-core.esm-bundler.js:7479:16)
at Proxy.render (Flicking.ts:192:8)
at renderComponentRoot (runtime-core.esm-bundler.js:893:44)
我已经在VUE3 oplectpref上实现了以下代码
<Flicking class="px-3" :options="{ moveType: 'freeScroll', bound: true } ">
<div @click="choosePref('1')>1</div>
<div @click="choosePref('2')>2</div>
<div @click="choosePref('3')>3</div>
<div @click="choosePref('4')>4</div>
</Flicking>
,该函数可以记录单击的DIV中的数字。
const choosePref = (num) =>{
console.log(num)
}
是我实施的问题还是软件包中有某种错误?您能解释一下错误以及如何解决错误吗?
I am using the Flicking package & the Flicking component is creating the carousel just fine but every time I try to move (flick) one of the child components an error is created by the Flicking component as follows.
Flicking.ts:58 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'key')
at Flicking.ts:58:19
at Array.map (<anonymous>)
at getPanels (Flicking.ts:57:28)
at normalizeChildren (runtime-core.esm-bundler.js:6408:42)
at createBaseVNode (runtime-core.esm-bundler.js:6170:9)
at _createVNode (runtime-core.esm-bundler.js:6263:12)
at createVNodeWithArgsTransform (runtime-core.esm-bundler.js:6128:12)
at h (runtime-core.esm-bundler.js:7479:16)
at Proxy.render (Flicking.ts:192:8)
at renderComponentRoot (runtime-core.esm-bundler.js:893:44)
I have implemented the following code on Vue3
<Flicking class="px-3" :options="{ moveType: 'freeScroll', bound: true } ">
<div @click="choosePref('1')>1</div>
<div @click="choosePref('2')>2</div>
<div @click="choosePref('3')>3</div>
<div @click="choosePref('4')>4</div>
</Flicking>
choosePref is a function that logs out the number in the div that was clicked.
const choosePref = (num) =>{
console.log(num)
}
Is the issue in my way of implementing or is there some sort of bug in the package? and can you please explain what the error is about and how to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论