{volist name="data" id="v"} {$v.id} {if condition="isset($v['children']) && !empty($v['children'])"} {else /} {/if} {$v.name} {if condition="$v['type'] == 2"} 切换 {/if} {if condition="isset($v['children']) && !empty($v['children'])"} {:widget_view('index/tree',['data'=>$v['children'],'depth'=>$depth + 1])} {/if} {/volist}