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
/megalo-demo/src/packageA/pages/a/components/ComA.vue
<template> <div @tap="handleTap">点击我{{ index }}</div> </template> <script> export default { props: { index: Number }, methods: { handleTap() { console.log("点击了:", this.index); } } }; </script> <style> </style>
/megalo-demo/src/packageA/pages/a/index.vue
<template> <div class="app"> <div>v-for 组件,组件里的点击事件失效</div> <com-a v-for="n in 9" :key="n" :index="n"/> <div v-for="n in 9" :key="n" @tap="handleTap(n)">点击我---{{ n }}</div> </div> </template> <script> import ComA from "./components/ComA"; export default { components: { ComA }, methods: { handleTap(i) { console.log('点击了---' + i) } } }; </script> <style lang="less" scoped> </style>
组件ComA里的点击事件失效了
ComA
The text was updated successfully, but these errors were encountered:
fix: component in v-for not trigger events #54
10a55ae
test: add tests for v-for #54
e5bf292
megalo@0.5.1 @megalo/template-compiler@0.5.1 支持
megalo@0.5.1 @megalo/template-compiler@0.5.1
Sorry, something went wrong.
elcarim5efil
No branches or pull requests
代码复现
/megalo-demo/src/packageA/pages/a/components/ComA.vue
/megalo-demo/src/packageA/pages/a/index.vue
问题现象
组件
ComA
里的点击事件失效了版本
操作系统
The text was updated successfully, but these errors were encountered: