From 893be86989dcf5138da835d817e865337a8d8781 Mon Sep 17 00:00:00 2001 From: juneszh Date: Wed, 13 Sep 2023 14:15:21 +0800 Subject: [PATCH] Fixed download bugs. --- README.md | 9 ++++++--- src/Admin.php | 4 +++- src/Admin/Console.php | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ef3c7db..5ea5105 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ $ composer create-project juneszh/alight-project {PROJECT_DIRECTORY} The following commands will build the runtime environment required by **Alight-Admin**, such as installing composer package, inserting configuration options, creating database tables, and downloading front-end resources. Please make sure the [database has been configured](https://github.com/juneszh/alight#database). ```bash $ cd {PROJECT_DIRECTORY} +$ composer require juneszh/alight-admin $ composer run admin-install $ composer run admin-download ``` @@ -142,13 +143,15 @@ Menu::item('Test'); Menu::subItem('User')->url('test/user/table'); ``` -Finally, the database table **user_admin** has completed **CRUD** creation +Finally, the database table **user_admin** has completed **CRUD** creation. See [API LIST](#api) for more information. ## Try the Console Charts -### Create simple Line Charts with built-in data. +### Create charts with built-in data. File: app/config/admin/console.php ```php +// Here using Line charts, we support 30+ charts with AntDesign Charts +// More details please refer to : https://charts.ant.design/en/docs/api Console::chart('Line')->config([ 'xField' => 'date', 'yField' => 'value', @@ -161,7 +164,7 @@ Console::chart('Line')->config([ ] ])->grid(['span' => 12]); // Means half the width of the grid. full of 24 ``` -### Create simple Column Charts with api data. +### Create charts with api data. File: app/config/admin/console.php ```php diff --git a/src/Admin.php b/src/Admin.php index c96f0b1..61c1f57 100644 --- a/src/Admin.php +++ b/src/Admin.php @@ -427,7 +427,9 @@ public static function download() $result = $phar->extractTo($dir); if ($result) { - self::publish(App::root($storagePath . '/download/alight-admin')); + self::publish(App::root($storagePath . '/download/dist')); + unlink($file); + unlink(substr($file, 0, -3)); } } } diff --git a/src/Admin/Console.php b/src/Admin/Console.php index 85a1b8d..5122474 100644 --- a/src/Admin/Console.php +++ b/src/Admin/Console.php @@ -69,7 +69,7 @@ class Console * @param string $component Console::CHART_* * @return ConsoleChart * - * @see https://charts.ant.design/en/api/graphic-style + * @see https://charts.ant.design/en/docs/api */ public static function chart(string $component): ConsoleChart {