didi / mpx

Mpx,一款具有优秀开发体验和深度性能优化的增强型跨端小程序框架

Home Page:https://mpxjs.cn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

vivine opened this issue · comments

问题描述

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