# Dcat-Admin Fork From [jqhph/dcat-admin](https://github.com/jqhph/dcat-admin) ## 改动 - 文件: `dcat-admin/src/Form/Footer.php`, 将 `reset` 按钮默认设置为 `false` ```php protected $buttons = ['reset' => false, 'submit' => true, 'back' => true]; public function disableBack(bool $disable = true) { $this->buttons['back'] = !$disable; } ``` - 添加 Form 表单的 `back` 按钮, 文件: `dcat-admin/resources/views/form/footer.blade.php` ```php @if(! empty($buttons['back']))
{{ trans('admin.back') }}
@endif ``` - 文件: `dcat-admin/src/Show/Tools.php`, 添加 `back` 按钮, `list` 默认设置为 `false`, 修改按钮的渲染方式(去掉外层的 `btn-group` 标签, 添加类名 `mr-1`) ```php protected $tools = ['back', 'list', 'edit', 'delete']; protected $showBack = true; public function disableBack(bool $disable = true) { $this->showBack = !$disable; return $this; } protected function renderBack() { if (! $this->showBack) { return; } $back = trans('admin.back'); return << {$back} HTML; } ```