Skip to content

Commit 18c7049

Browse files
authored
Update CurdService.php
1 parent 1d52dc3 commit 18c7049

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/curd/service/CurdService.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ protected function makeMenu(int $type = 1)
630630
$title = $this->tableComment ?: $title;
631631
$childMenu = [
632632
'href' => $href,
633-
'title' => $title,
633+
'title' => $this->config['menuname']?:$title,
634634
'status' => 1,
635635
'type' => 1,
636636
'menu_status' => 1,
@@ -641,7 +641,7 @@ protected function makeMenu(int $type = 1)
641641
'is_nav' => 1,//1导航栏;0 非导航栏
642642
'menu' => [ //菜单;
643643
'href' => 'table' . ($this->addon ?: ($this->app !== 'backend' ? $this->app : $this->controllerName)),
644-
'title' => $this->addon ?: ($this->app !== 'backend' ? $this->app : $this->controllerName),
644+
'title' => $this->config['menuname']?:($this->addon ?: ($this->app !== 'backend' ? $this->app : $this->controllerName)),
645645
'status' => 1,
646646
'auth_verify' => 1,
647647
'type' => 1,
@@ -714,7 +714,7 @@ protected function buildMenu($menuListArr, $type = 1)
714714
{
715715
$module = $this->addon ?: $this->app;
716716
foreach ($menuListArr as $k => $v) {
717-
$v['pid'] = 0;
717+
$v['pid'] = $this->config['menuid']?:0;
718718
$v['href'] = trim($v['href'], '/');
719719
$v['module'] = $module;
720720
$menu = AuthRule::withTrashed()->where('href', $v['href'])->where('module', $module)->find();
@@ -774,6 +774,7 @@ protected function getFormData()
774774
foreach ($this->fieldsList as $k => $vo) {
775775
if ($vo['COLUMN_KEY'] == 'PRI') continue;
776776
if (in_array($vo['name'], $this->config['ignoreFields']) and $vo['name'] != 'status') continue;
777+
if(!empty($this->config['formFields']) && !in_array($vo['name'], $this->config['formFields'])) continue;
777778
$name = Str::studly($vo['name']);
778779
switch ($vo['type']) {
779780
case "text":

0 commit comments

Comments
 (0)