45 lines
1.3 KiB
PHP
Raw Normal View History

2021-03-31 20:20:21 +08:00
<?php
namespace catchAdmin\permissions\tables;
use catcher\CatchTable;
use catchAdmin\permissions\tables\forms\Factory;
use catcher\library\table\Actions;
use catcher\library\table\HeaderItem;
use catcher\library\table\Search;
class Role extends CatchTable
{
public function table()
{
// TODO: Implement table() method.
return $this->getTable('role')
->header([
HeaderItem::label('角色名称')->prop('role_name')->width(300),
HeaderItem::label('角色标识')->prop('identify')->width(300),
2021-03-31 20:20:21 +08:00
HeaderItem::label('角色描述')->prop('description'),
HeaderItem::label('创建时间')->prop('created_at'),
HeaderItem::label('操作')->width(250)->actions([
2021-04-03 10:35:53 +08:00
Actions::update(), Actions::delete()
2021-03-31 20:20:21 +08:00
])
])
->withSearch([
2021-04-05 12:26:12 +08:00
Search::label('角色名称')->text('role_name', '角色名称'),
2021-03-31 20:20:21 +08:00
])
->withApiRoute('roles')
->withActions([
Actions::create()
2021-04-28 08:34:30 +08:00
])
->withBind()
->withDialogWidth('40%')
2021-03-31 20:20:21 +08:00
->toTreeTable()
2021-04-05 22:11:36 +08:00
->forceUpdate()
2021-03-31 20:20:21 +08:00
->render();
}
protected function form()
{
// TODO: Implement form() method.
return Factory::create('role');
}
}