id('metric-card-'.Str::random(8)); $this->class('card'); $this->height(220); $this->dropdown([ '1' => '最近 1 天', '7' => '最近 7 天', '30' => '最近 30 天', '90' => '最近 90 天', ]); } /** * 卡片内容 * * @param string $count * * @return $this */ public function withContent($dataList) { $string = ''; foreach ($dataList as $key => $value){ $string.= <<
$key
{$value} HTML; } return $this->footer( << $string HTML ); } }