setKey($spu_id); } protected function authorize($user): bool { return $user->can('dcat.admin.product_spus.setting_specs'); } /** * 按钮样式定义,默认 btn btn-white waves-effect * * @var string */ protected $style = 'btn btn btn-primary'; /** * 按钮文本 * * @return string|void */ public function title() { return __('admin_message.extensions.grid.tools.setting_specs'); } public function render() { $form = SettingSpuSpecs::make()->payload(['spu_id'=>$this->getKey()]); return Modal::make() ->lg() ->title($this->title()) ->body($form) ->button($this->html()); } /** * 设置请求参数 * * @return array|void */ public function parameters() { return [ ]; } }