链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

39 lines
701 B

<?php
namespace App\Admin\Extensions;
use Dcat\Admin\Grid\RowAction;
class OrderDetail extends RowAction
{
protected $title;
protected $order_id;
public function __construct($orderId,$title=null)
{
$this->order_id = $orderId;
parent::__construct($title);
}
/**
* 添加JS
* @return string
*/
protected function script()
{
return <<<JS
$('.detail_{$this->order_id}').on('click', function () {
window.location.href ="detail?order_id={$this->order_id}";
});
JS;
}
public function html()
{
$this->setHtmlAttribute(['class'=>"detail_{$this->order_id}"]);
return parent::html();
}
}