Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
af5e550ddb | ||
![]() |
265077229d | ||
![]() |
1c3f606165 | ||
![]() |
439d897038 | ||
![]() |
70a47e35ec | ||
![]() |
b36dea2b0a | ||
![]() |
63b622ab2a | ||
![]() |
667f6353d5 | ||
![]() |
e69cc0e147 | ||
![]() |
e5be0ca2f8 |
@@ -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": {
|
||||||
|
@@ -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 [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ class {request} extends Request
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function message(): array
|
public function messages(): array
|
||||||
{
|
{
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@@ -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,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -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';
|
||||||
|
|
||||||
|
@@ -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>
|
||||||
|
@@ -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()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user