# layui

{if condition="array_key_exists('create',$crud)"}

- 列表
- 新增

{/if}
{php} foreach($fieldsInfo as $vo){ if(empty($vo['ShowSearch'])){ continue; } $comment = empty($vo['Comment']) ? $vo['Field'] : $vo['Comment']; if($vo['Field'] == 'id'){ echo '
'; continue; } //输入框,文章段落,图片,复选框 if(in_array($vo['Component'],[0,3,4,7])){ echo '
'; continue; } //数字 if($vo['Component'] == 1){ echo '
'; continue; } //时间 if($vo['Component'] == 2){ echo '
'; continue; } //开关,下拉框，单选 if(in_array($vo['Component'],[5,6,8])){ $arr = explode(':',$vo['Comment']); $comment = count($arr)==2 ? $arr[0] : ($vo['Component']==5 ? $vo['Comment'] : $vo['Field']); $options = count($arr)==2 ? $arr[1] : $arr[0]; $option_arr = explode(',',$options); $option_html = ''; foreach($option_arr as $option_item){ $option_item_value = intval($option_item); $option_text = str_replace($option_item_value,'',$option_item); $option_html.= ''.$option_text.''; } echo '
'; continue; } } {/php}
{if condition="array_key_exists('update',$crud) or array_key_exists('delete',$crud)"}
{/if}

{literal}{include file="public/foot"}{/literal}
{if condition="array_key_exists('sort',$fieldsInfo)"}
{/if}