const towxmlNodes = app.towxml(this.cleanHtmlWhitespace(html), 'html', {
events: {
tap: (e: WxEvent) => {
this.handleComponentEvent(e)
},
},
})
return towxmlNodes
html code 是
<div class="bg-gradient-to-br from-blue-50 to-indigo-100 p-4" ${this.getComponentAttributes()}>
<div class="flex space-x-2">
<button class="flex-1 weather-action-btn" ${this.bindEvent('refresh')}>
🔄 刷新
</button>
<button class="flex-1 weather-action-btn" ${this.bindEvent('share')}>
📤 分享
</button>
<button class="flex-1 weather-action-btn" ${this.bindEvent('detail')}>
📊 详情
</button>
</div>
</div>
生成的是
其中的 decode 标签严重影响了样式层级
html code 是
生成的是
其中的 decode 标签严重影响了样式层级