# {$menuName}编辑

{literal}{empty name="$data"}{/literal}

- 列表
- 新增

{literal}{/empty}{/literal}
{volist name="$fieldsInfo" id="vo"} {php} if(empty($vo['ShowEdit'])){ continue; } if($vo['Field'] == 'id'){ continue; } {/php} {if condition="$vo['Component'] == 0"}
{$vo['Comment']|default=$vo['Field']}
{if condition="$vo['Default']===null"}
必填
{/if}
{/if} {if condition="$vo['Component'] == 1"}
{$vo['Comment']|default=$vo['Field']}
{if condition="$vo['Default']===null"}
必填
{/if}
{/if} {if condition="$vo['Component'] == 2"}
{$vo['Comment']|default=$vo['Field']}
{if condition="$vo['Default']===null"}
必填
{/if}
{/if} {if condition="$vo['Component'] == 3"}
{$vo['Comment']|default=$vo['Field']}
{literal}{notempty name="$data"}{$data.{/literal}{$vo['Field']}{literal}}{/notempty}{/literal}
{if condition="$vo['Default']===null"}
必填
{/if}
{/if} {if condition="$vo['Component'] == 9"} {literal} {php}$web_config = \think\Db::name('webconfig')->where('id', 1)->find();{/php} {switch name="$web_config.article_editor" } {case value="ueditor"} {include file="article/publish_ueditor" item="data" field="{/literal}{$vo['Field']}{literal}"}{/case} {case value="tinymce"} {include file="article/publish_tinymce" item="data" field="{/literal}{$vo['Field']}{literal}"}{/case} {case value="markdown"} {include file="article/publish_markdown" item="data" field="{/literal}{$vo['Field']}{literal}"}{/case} {default /} {include file="article/publish_wangEditor" item="data" field="{/literal}{$vo['Field']}{literal}"} {/switch} {/literal} {/if} {if condition="$vo['Component'] == 4"}
{$vo['Comment']|default=$vo['Field']}
{/if} {if condition="$vo['Component'] == 5"} {php} $arr = explode(':',$vo['Comment']); $comment = count($arr)==2 ? $arr[0] : $vo['Comment']; $options = count($arr)==2 ? $arr[1] : $arr[0]; $option_arr = ifContain($options,',') ? explode(',',$options) : ['0关闭','1开启']; {/php}
{$comment}
{volist name="$option_arr" id="option_item"} {php} $option_item_value = intval($option_item); $option_text = str_replace($option_item_value,'',$option_item); {/php} {/volist}
{if condition="$vo['Default']===null"}
必填
{/if}
{/if} {if condition="$vo['Component'] == 6"} {php} $arr = explode(':',$vo['Comment']); $comment = count($arr)==2 ? $arr[0] : $vo['Field']; $options = count($arr)==2 ? $arr[1] : $arr[0]; $option_arr = explode(',',$options); {/php}
{$comment}
{if condition="$vo['Default']===null"}
必填
{/if}
{/if} {if condition="$vo['Component'] == 7"} {php} $arr = explode(':',$vo['Comment']); $comment = count($arr)==2 ? $arr[0] : $vo['Field']; $options = count($arr)==2 ? $arr[1] : $arr[0]; $option_arr = explode(',',$options); {/php}
{$comment}
{volist name="$option_arr" id="option_item"} {php} $option_item_value = intval($option_item); $option_text = str_replace($option_item_value,'',$option_item); {/php} {/volist}
{if condition="$vo['Default']===null"}
必填
{/if}
{/if} {if condition="$vo['Component'] == 8"} {php} $arr = explode(':',$vo['Comment']); $comment = count($arr)==2 ? $arr[0] : $vo['Field']; $options = count($arr)==2 ? $arr[1] : $arr[0]; $option_arr = explode(',',$options); {/php}
{$comment}
{volist name="$option_arr" id="option_item"} {php} $option_item_value = intval($option_item); $option_text = str_replace($option_item_value,'',$option_item); {/php} {/volist}
{if condition="$vo['Default']===null"}
必填
{/if}
{/if} {/volist} {literal} {notempty name="$data"} {/notempty} {/literal}