多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## 方法 设置值内容: ```php $item = $listRows->item('李阳'); ``` 设置`th`样式: ```php $item->thStyle($style); ``` 设置`th` Ui Class: ```php $item->thClass($uiClass); ``` 设置`th` 属性: ```php $item->thAttribute($attribute); ``` 设置`td`样式: ```php $item->tdStyle($style); ``` 设置`td` Ui Class: ```php $item->tdClass($uiClass); ``` 设置`td` 属性: ```php $item->tdAttribute($attribute); ``` ## 示例 ~~~ /** * @return string * @throws \builder\base\InvalidInstanceException * @throws \builder\base\NotFoundParamsException */ public function actionDetail() { $viewBuilder = $this->viewBuilder; $viewBuilder->setPartial(); $lists = $viewBuilder->lists; $lists->setTitle('详情构建器') ->setListRows([ [ '班级' => $this->listRows->item('二班')->thAttribute(['width' => 90]), '班主任' => $this->listRows->item('李阳')->thAttribute(['width' => 90]), '联系方式' => $this->listRows->item('12225478878')->thAttribute(['width' => 90]), ], [ '用户名' => $this->listRows->item('杨慧磊'), '积分' => $this->listRows->item(500), '状态' => $this->listRows->item(H5::badge('成功')), ], '手机号' => $this->listRows->item(function () { return '15030321254'; })->tdAttribute(['colspan' => 5]), '订单号' => $this->listRows->item('N01878016587493544427')->tdAttribute(['colspan' => 5]), '平台' => $this->listRows->item('淘宝')->tdAttribute(['colspan' => 5]), '店铺' => $this->listRows->item('Wd028,爱吃鱼')->tdAttribute(['colspan' => 5]), '省' => $this->listRows->item('河南省')->tdAttribute(['colspan' => 5]), '市' => $this->listRows->item('郑州市')->tdAttribute(['colspan' => 5]), '区(县)' => $this->listRows->item('金水区')->tdAttribute(['colspan' => 5]), '详细地址' => $this->listRows->item('国贸大厦102')->tdAttribute(['colspan' => 5]), '商品信息' => $this->listRows->item('闪迪512g/1700 CFE卡')->tdAttribute(['colspan' => 5]), '员工' => $this->listRows->item('李四')->tdAttribute(['colspan' => 5]), '订单金额' => $this->listRows->item('100.00')->tdAttribute(['colspan' => 5]), '收益' => $this->listRows->item('20.00')->tdAttribute(['colspan' => 5]), '提成' => $this->listRows->item('5.00')->tdAttribute(['colspan' => 5]), '注册时间' => $this->listRows->item('2023/03/02 02:00')->tdAttribute(['colspan' => 5]), ]); return $viewBuilder->render(); } ~~~