Skip to content
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

[Bug report] wxml 存在 <template is="xxx" /> 引用模板的时候,template 里边的事件没法编译,使用不了proxyEventHandler #1465

Closed
vivine opened this issue May 9, 2024 · 1 comment

Comments

@vivine
Copy link

vivine commented May 9, 2024

问题描述

wxml 如果存在 引用模板的时候,template 里边的事件没法编译,无法使用 proxyEventHandler。

导致在 proxyEventHandler 里做的一些埋点不起作用。

比如:

<template name="xxx">
  <view bindtap="clickMe">点击一下</view>
</template>

<template is="xxx" />

期望编译结果

<view bindtap="__invoke" data-eventconfigs='{{ {tap:[["clickMe"]]} }}'>点击一下</view>

实际编译结果

<view bindtap="clickMe">点击一下</view>

另外,使用 import 或者 include 引入模板的时候估计也会有这个问题,希望一起修复一下

template 文档:https://developers.weixin.qq.com/miniprogram/dev/reference/wxml/template.html

import/include 文档:https://developers.weixin.qq.com/miniprogram/dev/reference/wxml/import.html

@hiyuki
Copy link
Collaborator

hiyuki commented May 21, 2024

@hiyuki hiyuki closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants