master
wangxinglong 2022-03-16 18:09:27 +08:00
parent 14c508afeb
commit fd8cc84bef
1 changed files with 5 additions and 3 deletions

View File

@ -24,13 +24,15 @@
<option value="">请选择</option>
{foreach $type as $value}
<optgroup label="{$value['name']}">
<option value="{$value['id']}" {if $item['type'] ==$value['id'] } selected {/if}>{$value['name']} </option>
{if !empty($value['children'])}
{foreach $value['children'] as $ckey => $cvalue}
<option value="{$cvalue['id']}" {if $item['type'] ==$cvalue['id'] } selected {/if}>{$cvalue['name']}</option>
<option value="{$cvalue['id']}" {if $item['type'] ==$cvalue['id'] } selected {/if}>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$value['name']}</option>
{/foreach}
{/if}
</optgroup>
{/foreach}
</select>
</div>