关于开发实例中的detail调用
先在html中增加detail按钮->js中写按钮的功能
{S75IA1nQwmpIyBByHsX5Dg==name: 'detail',
title: __('弹出窗口打开'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: 'example/bootstraptable/detail',
callback: function (data) {
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
}
},
detail: function () {QQXD9uG/I160wFWlnzhB5Q==$(document).on('click', '.btn-callback', function () {
Fast.api.close($("input[name=callback]").val());
});
},
通过url:'example/bootstraptable/detail'跳转到php的方法中,然后我想知道的是 这个方法是怎么跟detail.html文件关联起来的lDHc1yqoRbvIxzhDN7e05g==/**
* 详情
*/
public function detail($ids)
{
$row = $this->model->get(['id' => $ids]);
if (!$row) {
$this->error(__('No Results were found'));
}
if ($this->request->isAjax()) {
$this->success("Ajax请求成功", null, ['id' => $ids]);
}
$this->view->assign("row", $row->toArray());
return $this->view->fetch();
}
是$this-view-fetch()方法吗,有没有大佬能讲讲自定义html文件是怎么被调用的?