10 Commits

Author SHA1 Message Date
JaguarJack
af5e550ddb update version 2024-03-14 13:18:31 +08:00
JaguarJack
265077229d fix:模型生成 2024-03-14 13:07:28 +08:00
JaguarJack
1c3f606165 fix:修复Dialog样式 2024-03-14 12:20:53 +08:00
JaguarJack
439d897038 fix:修复Laravel丢弃的接口 2024-03-14 12:17:32 +08:00
JaguarJack
70a47e35ec fix:添加Attribute trait 2024-03-14 11:43:18 +08:00
JaguarJack
b36dea2b0a chore:update version 2024-03-14 11:29:38 +08:00
JaguarJack
63b622ab2a chore:更新至Laravel11 2024-03-14 10:50:24 +08:00
JaguarJack
667f6353d5 fix:修复生成 Request message 方法 2024-03-13 09:48:21 +08:00
JaguarJack
e69cc0e147 fix:修复页面权限指令 2024-03-07 12:00:05 +08:00
JaguarJack
e5be0ca2f8 fix: 优化提示 2024-03-07 11:28:09 +08:00
8 changed files with 39 additions and 34 deletions

View File

@@ -11,19 +11,18 @@
], ],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^8.1", "php": "^8.2",
"ext-pdo": "*", "ext-pdo": "*",
"ext-zip": "*", "ext-zip": "*",
"doctrine/dbal": "^3.4", "guzzlehttp/guzzle": "^7.8.1",
"guzzlehttp/guzzle": "^7.2", "laravel/framework": "^v11.0.3",
"laravel/framework": "^10.0", "laravel/tinker": "^v2.9.0",
"laravel/tinker": "^2.8", "catchadmin/core": "^0.3.2"
"catchadmin/core": "^0.2.7"
}, },
"require-dev": { "require-dev": {
"fakerphp/faker": "^1.9.1", "fakerphp/faker": "^v1.23.1",
"mockery/mockery": "^1.4.4", "mockery/mockery": "^1.6.9",
"pestphp/pest": "^1.22" "pestphp/pest": "^v2.34.2"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

View File

@@ -20,23 +20,27 @@ class Components implements OptionInterface
public function get(): array public function get(): array
{ {
if ($module = request()->get('module')) { try {
$components = File::glob(CatchAdmin::getModuleViewsPath($module).'*'.DIRECTORY_SEPARATOR.'*.vue'); if ($module = request()->get('module')) {
$components = File::glob(CatchAdmin::getModuleViewsPath($module) . '*' . DIRECTORY_SEPARATOR . '*.vue');
foreach ($components as $component) { foreach ($components as $component) {
$_component = Str::of($component) $_component = Str::of($component)
->replace(CatchAdmin::moduleRootPath(), '') ->replace(CatchAdmin::moduleRootPath(), '')
->explode(DIRECTORY_SEPARATOR); ->explode(DIRECTORY_SEPARATOR);
$_component->shift(2); $_component->shift(2);
$this->components[] = [ $this->components[] = [
'label' => Str::of($_component->implode('/'))->replace('.vue', ''), 'label' => Str::of($_component->implode('/'))->replace('.vue', ''),
'value' => Str::of($component)->replace(CatchAdmin::moduleRootPath(), '')->prepend('/') 'value' => Str::of($component)->replace(CatchAdmin::moduleRootPath(), '')->prepend('/')
]; ];
}
} }
}
return $this->components; return $this->components;
} catch (\Throwable $exception) {
return [];
}
} }
} }

View File

@@ -92,14 +92,13 @@ class Schemas extends CatchModel
$columns = []; $columns = [];
foreach (getTableColumns($schema->name) as $columnString) { foreach (\Illuminate\Support\Facades\Schema::getColumns($schema->name) as $column) {
$column = DB::connection()->getDoctrineColumn(DB::connection()->getTablePrefix().$schema->name, $columnString);
$columns[] = [ $columns[] = [
'name' => $column->getName(), 'name' => $column['name'],
'type' => $column->getType()->getName(), 'type' => $column['type_name'],
'nullable' => ! $column->getNotnull(), 'nullable' => $column['nullable'],
'default' => $column->getDefault(), 'default' => $column['default'],
'comment' => $column->getComment() 'comment' => $column['comment'],
]; ];
} }

View File

@@ -21,7 +21,7 @@ class {request} extends Request
* *
* @return array * @return array
*/ */
public function message(): array public function messages(): array
{ {
return []; return [];
} }

View File

@@ -13,7 +13,7 @@ import { useShow } from '/admin/composables/curd/useShow'
import { onMounted } from 'vue' import { onMounted } from 'vue'
const props = defineProps({ const props = defineProps({
primary: String | Number, primary: [String, Number],
api: String, api: String,
}) })

View File

@@ -6,6 +6,7 @@ use Catch\CatchAdmin;
use Catch\Traits\DB\BaseOperate; use Catch\Traits\DB\BaseOperate;
use Catch\Traits\DB\ScopeTrait; use Catch\Traits\DB\ScopeTrait;
use Catch\Traits\DB\Trans; use Catch\Traits\DB\Trans;
use Catch\Traits\DB\WithAttributes;
use Illuminate\Contracts\Http\Kernel; use Illuminate\Contracts\Http\Kernel;
use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@@ -16,7 +17,7 @@ use Symfony\Component\HttpFoundation\Response;
class LogOperate extends Model class LogOperate extends Model
{ {
use BaseOperate, Trans, ScopeTrait; use WithAttributes,BaseOperate, Trans, ScopeTrait;
protected $table = 'log_operate'; protected $table = 'log_operate';

View File

@@ -12,7 +12,9 @@
</div> </div>
</div> </div>
</template> </template>
<slot /> <div class="pt-4">
<slot />
</div>
<template #footer v-if="showFooter"> <template #footer v-if="showFooter">
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="close">{{ $t('system.cancel') }}</el-button> <el-button @click="close">{{ $t('system.cancel') }}</el-button>

View File

@@ -8,7 +8,7 @@ function checkAction(el: any, action: any) {
action = action.value.replace('@', '.').toLowerCase() action = action.value.replace('@', '.').toLowerCase()
const hasAction = permissions?.some(permission => { const hasAction = permissions?.some(permission => {
if (permission.type === MenuType.Button_Type) { if (permission.type === MenuType.Button_Type) {
const a: string = permission.module + '.' + permission.permission_mark.replace('@', '.') const a: string = permission.module + '.' + permission.permission_mark.replaceAll('@', '.')
return action === a.toLowerCase() return action === a.toLowerCase()
} }
}) })