mpx icon indicating copy to clipboard operation
mpx copied to clipboard

[Feature Request]希望mpx编译为web代码时能支持事件代理。

Open Inchill opened this issue 4 years ago • 1 comments

问题描述: 我有两种组件,分别是 A 和 B。现在 A 里面会嵌套 B 或者是使用 slot 自定义嵌套 B。我想通过事件代理的形式在 A 组件处理,小程序配置 bubble 和 compose 可以被捕获,但是 web 端就不行了。

<component-A bind:change="onChange">
  <slot wx:if="{{ showSlot }}"></slot>
  <component-B wx:else></component-B>
</component-A>

Inchill avatar Nov 14 '21 04:11 Inchill

目前的事件实现机制下暂不支持冒泡,后续我们会考虑重构事件机制以实现冒泡特性

hiyuki avatar Nov 22 '21 04:11 hiyuki