You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, passing items via props lacks flexibility.
For example:
Parent components cannot call child (item) component methods by binding a ref.
Item components cannot trigger parent component events using the @ syntax.
Adopting a slot-based approach would resolve these issues.
Hope this usage can be supported in future updates.
(目前使用参数引入item组件灵活性太弱。
比如父组件调用item组件方法,无法绑定ref进行调用;
item组件调用父组件事件无法@语法进行;
如果兼容插槽slot形式就能解决这些问题。
希望可以更新这个用法) @reactjser
<template #item="{ item, index }"> <my-item :item="item" @click="onClick" /> </template>