Skip to content

Commit

Permalink
Fixed download bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
juneszh committed Sep 13, 2023
1 parent f33c051 commit 893be86
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down Expand Up @@ -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',
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 893be86

Please sign in to comment.