💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
页面调用案例### ~~~ {:TWidget($contObj)->formWidgets([ ['title|text','标题|用于后台显示的配置标题'], ['sort|number','排序|用于分组显示的顺序', ['tip'=>'测试:用于分组显示的顺序'] ], ['icon_class|text','图标类名', ['icon'=>'fa fa-angle-right'] ], ['url|text','链接|U函数解析的URL或者外链'], ['pid|select','上级菜单|所属的上级菜单',[M('Menu')->getTreeMenus(), 'id|title_show']], ['group|text','分组|用于左侧分组二级菜单'], ['cover_id|images', '封面图片'], ['cover_ids|cropper', '封面图片2', ['pic_num'=>2,'pic_wh'=>'100*200'] ], ['tip|text','说明|菜单详细说明'], ['birthday|date', '天'], ['birthday1|datetime', '时'], ['birthday2|dateyear', '年'], ['birthday3|datemonth', '月'], ['tags|tags', '标签',], ['id|hidden'], ['type2|checkbox','多选|多选测试',[config('CONFIG_TYPE_LIST')]], ['type3|radio','单选|单选测试',[config('yes_no')]], ['is_open|switch','配置类型|系统会根据不同类型解析配置值'], ['content|kindeditor', '内容'], ['is_show_difficulty|switch','是否显示难度'], ['project_difficulty|select','难度',['listdata'=>config('project_difficulty'),'key_relevance'=>'id|name','open_by'=>'is_show_difficulty']], ['contact_settings[]|checkbox','',['listdata'=>$contact_attr['child'],'key_relevance'=>'field|name','hide_label'=>1]], ])} ~~~ ### 组件调用说明 此方法在控制器内调用,加载相应组件所需要的依赖文件 ~~~ ->recordWidgets( [['echarts'],['cropper'],['images'],['datetimepicker'],['tagsinput'],['kindeditor']] ) ~~~ | 编辑类型名称 | 编辑类型KEY | 组件调用KEY值 | | ---| --- | --- | | 图片裁剪 | cropper | cropper | | 图片 | images | images | | 时间 | datetime | datetimepicker | | 年 | dateyear | datetimepicker | | 月 | datemonth | datetimepicker | | 日 | date | datetimepicker | | 标签 | tags | tagsinput | | 富文本编辑器 | kindeditor | kindeditor | ### 传入数据 ~~~ {php} echo TWidget($contObj)->builder('form',function($builder,$info){ return $builder->addWidgets([ ['cover_id|images', ''], //['cover_ids|cropper', '封面图片2', ['pic_num'=>2,'pic_wh'=>'100*200'] ], ])->setWidgetsValues( $info ); },$info ) {/php} ~~~