招标
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.
 
 
 
 
 

44 lines
861 B

<?php
/**
*
* ListCreate.php
* User: ChenLong
* DateTime: 2020/3/18 14:07
*/
namespace sdModule\makeAdminBasics\htmlUnit;
class ListUpdate implements ListUnitInterface
{
/**
* @return string
*/
public function event()
{
return 'update';
}
/**
* @param string $template
*/
public function register(string $template)
{
$code = "<button type=\"button\" lay-event=\"{$this->event()}\" class=\"layui-btn layui-btn-xs\"><i class=\"layui-icon layui-icon-edit\"></i>{:lang('edit')}</button>";
JsFacade::loadTemplate($this->event(), $code, $this->js(), $template);
}
/**
* @return string
*/
private function js()
{
return <<<JS
custom.frame('{:url("{$this->event()}")}?id=' + obj.data[primary], '{:lang("edit")}{\$page_name ?: ""}');
JS;
}
}