lg() ->title($this->title) ->body($form) ->onLoad($this->getModalScript()) ->button($this->title); } protected function getModalScript() { // 弹窗显示后往隐藏的id表单中写入批量选中的行ID return <<getSelectedKeysScript()} $('#order-profit-ids').val(key); JS; } }