-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cell] cell组件中click传参数未更新 #1246
Comments
👋 @LoopZhou,感谢给 TDesign 提出了 issue。 |
临时解决可以通过将 <div v-for="(item, index) in list">
<t-cell
:key="item.name"
:title="item.name"
@click="testLog(index)"
></t-cell>
</div> |
<div v-for="(item, index) in dataArr" :key="item.name">
<t-cell note="辅助信息" @click="testLog(index)">
<template #title>
{{ item.name }}
</template>
</t-cell>
</div> 自测过这样写就可以更新了,tag如果像之前cell这样的写法,用:content="item.name",也会更新不了,个人认为可以换成这种写法 |
我尝试排查原因,最终发现跟 emits👉: https://cn.vuejs.org/api/options-state.html#emits 我会尝试提交 PR 修复这个问题。 |
tdesign-mobile-vue 版本
1.1.0
重现链接
https://stackblitz.com/edit/gk4j3n-9ypxb5?file=src%2Fdemo.vue
重现步骤
参考重现示例中,testLog方法打印index, 当删除dataArr中一个数据中, cell的index未更新, tag组件正常更新
2024-03-04.12.38.35.mov
期望结果
cell组件click方法中参数更新
实际结果
cell组件click方法中参数未更新
框架版本
Vue(3.2.0)
浏览器版本
Chrome(117.0.5938.149)
系统版本
MacOS
Node版本
16.17.0
补充说明
No response
The text was updated successfully, but these errors were encountered: