We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.1.0
https://stackblitz.com/edit/gk4j3n-9ypxb5?file=src%2Fdemo.vue
参考重现示例中,testLog方法打印index, 当删除dataArr中一个数据中, cell的index未更新, tag组件正常更新
cell组件click方法中参数更新
cell组件click方法中参数未更新
Vue(3.2.0)
Chrome(117.0.5938.149)
MacOS
16.17.0
No response
The text was updated successfully, but these errors were encountered:
👋 @LoopZhou,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
Sorry, something went wrong.
tag 也有这个问题,看源码大概有 12 个组件有这个问题,全局搜下关键字 props.onClick 可以找到,将源码改为 context.emit 的方式也许可以修复。
tag
props.onClick
context.emit
临时解决可以通过将 key 绑定在 t-<name> 上解决。
key
t-<name>
<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",也会更新不了,个人认为可以换成这种写法 @LoopZhou
我尝试排查原因,最终发现跟 emits 声明和 props 定义有关。 应该跟组件本身无关,更多可能是 Vue 的写法有关,个人觉得是个值得讨论的问题。
emits
props
emits👉: https://cn.vuejs.org/api/options-state.html#emits demo👉: https://stackblitz.com/edit/vitejs-vite-z7hfy7?file=src%2FApp.vue
我会尝试提交 PR 修复这个问题。
No branches or pull requests
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: