需求是点击属性按钮弹框的内容要和所选列表的内容对应
一、首先在js对应的文件给table表格增加一个按钮
注:必需绑定事件,如果没绑定事件,弹框的内容就不能操作
二、在对应的控制器添加change方法,ids的参数是默认的
public function change($ids = null) {
$row = $this->model->get($ids);
if (!$row) {
$this->error(__('No Results were found'));
}
if ($this->request->isPost()) {
$params = $this->request->post("row/a");
$this->error(__('Parameter %s can not be empty', ''));
}
$this->view->assign("row", $row);
return $this->view->fetch();
}
效果图: