some fix
This commit is contained in:
parent
71b2fdfb6b
commit
4a12eeccfd
@ -276,10 +276,10 @@ class ListJsonTable extends JasonTable
|
|||||||
if ($this->pagination) {
|
if ($this->pagination) {
|
||||||
$options = [
|
$options = [
|
||||||
'countItem' => $this->data['meta']['total'],
|
'countItem' => $this->data['meta']['total'],
|
||||||
'perPage' => $this->data['meta']['perPage'],
|
'perPage' => $this->data['meta']['perPage'] ?? 10,
|
||||||
'currentPage' => $this->data['meta']['currentPage'],
|
'currentPage' => $this->data['meta']['currentPage'] ?? 1,
|
||||||
'baseUrl' => $this->baseUrl,
|
'baseUrl' => $this->baseUrl ?? '',
|
||||||
'prefix' => $this->data['meta']['paginationPrefix'],
|
'prefix' => $this->data['meta']['paginationPrefix'] ?? '/page',
|
||||||
];
|
];
|
||||||
$pagination = new Pagination($options);
|
$pagination = new Pagination($options);
|
||||||
$pagination->create();
|
$pagination->create();
|
||||||
|
@ -13,9 +13,14 @@ class ViewJsonTable extends JasonTable
|
|||||||
private array $dataJson;
|
private array $dataJson;
|
||||||
public function __construct($json)
|
public function __construct($json)
|
||||||
{
|
{
|
||||||
|
$this->beforePrintCell = false;
|
||||||
$this->json = $json;
|
$this->json = $json;
|
||||||
$this->data = json_decode($this->json, true);
|
$this->data = json_decode($this->json, true);
|
||||||
$this->dataJson = $this->data['data'];
|
$this->dataJson = $this->data['data'];
|
||||||
|
$this->beforePrintHook = function () {
|
||||||
|
};
|
||||||
|
$this->afterPrintHook = function () {
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beginTable(): void
|
public function beginTable(): void
|
||||||
|
Loading…
Reference in New Issue
Block a user