Merge branch 'develop' of gitee.com:karson/fastadmin into develop

pull/446/head
Karson 2023-06-14 10:42:11 +08:00
parent 164a4f6664
commit 4b4d4493aa
3 changed files with 5 additions and 3 deletions

View File

@ -3,7 +3,7 @@
return [ return [
[ [
//配置唯一标识 //配置唯一标识
'name' => 'usernmae', 'name' => 'username',
//显示的标题 //显示的标题
'title' => '用户名', 'title' => '用户名',
//类型 //类型

View File

@ -397,7 +397,8 @@ class Backend extends Controller
$arr = $arr[0]; $arr = $arr[0];
} }
$tableArr = explode('.', $k); $tableArr = explode('.', $k);
if (count($tableArr) > 1 && $tableArr[0] != $name && !in_array($tableArr[0], $alias) && !empty($this->model)) { if (count($tableArr) > 1 && $tableArr[0] != $name && !in_array($tableArr[0], $alias)
&& !empty($this->model) && $this->relationSearch) {
//修复关联模型下时间无法搜索的BUG //修复关联模型下时间无法搜索的BUG
$relation = Loader::parseName($tableArr[0], 1, false); $relation = Loader::parseName($tableArr[0], 1, false);
$alias[$this->model->$relation()->getTable()] = $tableArr[0]; $alias[$this->model->$relation()->getTable()] = $tableArr[0];

View File

@ -914,7 +914,8 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
row.ids = ids ? ids : (typeof row.ids !== 'undefined' ? row.ids : 0); row.ids = ids ? ids : (typeof row.ids !== 'undefined' ? row.ids : 0);
url = url == null || url.length === 0 ? '' : url.toString(); url = url == null || url.length === 0 ? '' : url.toString();
//自动添加ids参数 //自动添加ids参数
url = !url.match(/\{ids\}/i) ? url + (url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + '{ids}' : url; url = !url.match(/(?=([?&]ids=)|(\/ids\/)|(\{ids}))/i) ?
url + (url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + '{ids}' : url;
url = url.replace(/\{(.*?)\}/gi, function (matched) { url = url.replace(/\{(.*?)\}/gi, function (matched) {
matched = matched.substring(1, matched.length - 1); matched = matched.substring(1, matched.length - 1);
if (matched.indexOf(".") !== -1) { if (matched.indexOf(".") !== -1) {