From 948082f4ce514f5157c1765f205b8e1756510f45 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Wed, 10 May 2023 16:52:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9D=83=E9=99=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E7=AC=A6=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/Permissions/Models/Permissions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/Permissions/Models/Permissions.php b/modules/Permissions/Models/Permissions.php index 16d9e7c..99761db 100644 --- a/modules/Permissions/Models/Permissions.php +++ b/modules/Permissions/Models/Permissions.php @@ -10,6 +10,7 @@ use Catch\Enums\Status; use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Str; use Modules\Permissions\Enums\MenuStatus; use Modules\Permissions\Enums\MenuType; @@ -199,6 +200,7 @@ class Permissions extends Model $data['route'] = '/'.trim($data['route'], '/'); } + $data['component'] = Str::of($data['component'])->replace('\\', '/')->toString(); return parent::storeBy($data); }); } @@ -244,6 +246,7 @@ class Permissions extends Model $data['permission_mark'] = $parentMenu->permission_mark.'@'.$data['permission_mark']; } + $data['component'] = Str::of($data['component'])->replace('\\', '/')->toString(); return parent::updateBy($id, $data); } }