getKey()}"; // 模态窗 $this->modal($id); return << HTML; } protected function modal($id) { $form = new ImportExcelBedForm(); Admin::script('Dcat.onPjaxComplete(function () { $(".modal-backdrop").remove(); $("body").removeClass("modal-open"); }, true)'); // 通过 Admin::html 方法设置模态窗HTML Admin::html( << HTML ); } /** * @param Model|Authenticatable|HasPermissions|null $user * * @return bool */ protected function authorize($user): bool { return true; } /** * @return array */ protected function parameters() { return []; } }