[TOC]

设置TAB切换

用法

默认第一个回调函数参数为this本身

DEMO图

使用FROM

 return Bear::make('form')
        ->setLeftMenu($leftMenus)
        // ->addStatic('
基本数据
') ->addText('table','表名',$table,['readonly'=>'readonly']) ->addText('field','字段',$fieldInfo['Field'],['readonly'=>'readonly']) ->addText('alias_name','别名',$alias_name) ->addSelect('mold','类型',Bear::make('form')->getFormType(),$mold) ->addRadio('is_show_list','是否列表显示',['否','是'],(int)$is_show_list) ->addText('sort_list','列表显示排序',(int)$sort_list) ->addRadio('is_write','是否可编辑',['否','是'],(int)$is_write) ->addText('sort_edit','编辑显示排序',(int)$sort_edit) ->addText('role','验证规则',$role,['tips'=>'查看支持的规则列表点击查看多个用|分隔']) ->addText('insert_before','数据插入',$role,['tips'=>'数据入库前的处理,支持htmlspecilchar,encode点击查看多个用,号隔开']) ->addText('select_after','数据查找',$role,['tips'=>'数据查出后的函数处理,支持htmlspecilchar_decode,decode点击查看多个用,号隔开']) ->addTextarea('remark','备注',$remark) ->setNav('基本设置',['table','field','alias_name','mold',]) ->setNav('列表设置',['is_show_list','sort_list']) ->setNav('编辑设置',['is_write','sort_edit','role','insert_before','select_after','remark']) ->fetch();

其它写法

setNav([
    '基本配置'=>['title','wx_return_type','sort'],
    '标题配置'=>['pre_title','return_title_field','nex_title'],
    '描述配置'=>['pre_des','des','nex_des'],
    ])