template模板无法循环套用
发布于 5 年前 作者 xiuying18 6508 次浏览 来自 问答

<template name=“wxParseDefault”>

<block wx:for="{{wxParseData}}" wx:key="">

<template is=“wxParseDefault0” data="{{item}}"/>

</block>

</template>

<template name=“wxParseDefault0”>

<block wx:if="{{item.node==‘element’}}">

<block wx:if="{{item.tagType==‘block’}}">

<view class="{{item.classStr}} wxParse-{{item.tag}}" style="{{item.styleStr}}">

<block wx:if="{{item.nodes.length!=0}}">

<block wx:for="{{item.nodes}}" wx:for-item=“item” wx:key="">

<view>sfsa</view>

<!-- <template is=“wxParseDefault0” data="{{item}}"/> -->

</block>

</block>

</view>

</block>

</block>

<block wx:elif="{{item.node==‘text’}}">

<view>text</view>

</block>

</template>

为什么template模板中的内容无法循环套用自身

回到顶部