ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
builder构建器需要传入2个参数:builder类型及builder函数其内部实现参照对应builder里的方法。 例一: ~~~ {php} echo TWidget($contObj)->builder('form',function($builder){ return $builder->addWidgets([ ['title|text','标题|用于后台显示的配置标题'] ]); } ) {/php} ~~~ 例二: ~~~ {php} echo TWidget($contObj)->builder('table',function($builder){ return $builder->setColumns([ // 批量设置数据列 ['id','ID'], ['project_id','project_id'], ]); } ) {/php} ~~~