feat(produce): 完善统计、菜单与扫码搜索
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
if (!$schema->hasTable('sys_menu')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$icons = [
|
||||
'article' => 'ant-design:read-outlined',
|
||||
'article:index' => 'ant-design:file-text-outlined',
|
||||
'article:category:index' => 'ant-design:folder-open-outlined',
|
||||
'article:tag:index' => 'ant-design:tags-outlined',
|
||||
'article:recycle:index' => 'ant-design:delete-outlined',
|
||||
];
|
||||
foreach ($icons as $code => $icon) {
|
||||
$schema->getConnection()->table('sys_menu')->where('app', 'article')->where('code', $code)->update([
|
||||
'icon' => $icon,
|
||||
'updated_at' => time(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
}
|
||||
};
|
||||
@@ -11,7 +11,7 @@ return [
|
||||
'code' => 'article',
|
||||
'app' => 'article',
|
||||
'path' => '/article',
|
||||
'icon' => 'plugin',
|
||||
'icon' => 'ant-design:read-outlined',
|
||||
'children' => [
|
||||
[
|
||||
'name' => '内容中心',
|
||||
@@ -19,6 +19,7 @@ return [
|
||||
'app' => 'article',
|
||||
'path' => '/article/index',
|
||||
'component' => '/article/content/index',
|
||||
'icon' => 'ant-design:file-text-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '内容分类',
|
||||
@@ -26,6 +27,7 @@ return [
|
||||
'app' => 'article',
|
||||
'path' => '/article/category',
|
||||
'component' => '/article/category/index',
|
||||
'icon' => 'ant-design:folder-open-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '标签管理',
|
||||
@@ -33,6 +35,7 @@ return [
|
||||
'app' => 'article',
|
||||
'path' => '/article/tag',
|
||||
'component' => '/article/tag/index',
|
||||
'icon' => 'ant-design:tags-outlined',
|
||||
],
|
||||
[
|
||||
'name' => '内容回收站',
|
||||
@@ -40,6 +43,7 @@ return [
|
||||
'app' => 'article',
|
||||
'path' => '/article/recycle',
|
||||
'component' => '/article/recycle/index',
|
||||
'icon' => 'ant-design:delete-outlined',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user