+ zin: add thinkstepdetail wg.
This commit is contained in:
@@ -197,3 +197,4 @@ function thinkCheckbox(): thinkCheckbox {return createWg('thinkCheckbox', func_g
|
||||
function thinkOptions(): thinkOptions{return createWg('thinkOptions', func_get_args());}
|
||||
function thinkTableInput(): thinkTableInput {return createWg('thinkTableInput', func_get_args());}
|
||||
function thinkInput(): thinkInput {return createWg('thinkInput', func_get_args());}
|
||||
function thinkStepDetail(): thinkStepDetail {return createWg('thinkStepDetail', func_get_args());}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
namespace zin;
|
||||
|
||||
/**
|
||||
* 思引师表格基础详情部件类。
|
||||
* thinmory basic detail widget class.
|
||||
*/
|
||||
|
||||
class thinkStepDetail extends wg
|
||||
{
|
||||
protected static array $defineProps = array(
|
||||
'type?: string', // 节点或者题型类型
|
||||
'title?: string', // 标题
|
||||
'desc?: string', // 描述
|
||||
);
|
||||
protected function detailHeading()
|
||||
{
|
||||
list($title, $desc) = $this->prop(array('title', 'desc'));
|
||||
return div
|
||||
(
|
||||
div
|
||||
(
|
||||
setClass('flex items-start justify-between'),
|
||||
setStyle(array('padding' => '24px 48px 8px')),
|
||||
div
|
||||
(
|
||||
setClass('text-md leading-6 font-medium'),
|
||||
setStyle(array('color' => '#313C52')),
|
||||
$title
|
||||
),
|
||||
div
|
||||
(
|
||||
setClass('w-12 ml-2'),
|
||||
setStyle(array('min-width' => '48px')),
|
||||
a
|
||||
(
|
||||
icon('edit', setClass('border-0 mr-2 w-4'))
|
||||
),
|
||||
a
|
||||
(
|
||||
icon('trash', setClass('border-0 w-4'))
|
||||
)
|
||||
)
|
||||
),
|
||||
div
|
||||
(
|
||||
setClass('text-sm leading-6'),
|
||||
setStyle(array('color' => '#9EA3B0', 'padding' => '0 48px')),
|
||||
$desc
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
protected function buildBody(): array
|
||||
{
|
||||
return array(
|
||||
$this->detailHeading(),
|
||||
);
|
||||
}
|
||||
protected function build(): array
|
||||
{
|
||||
return array
|
||||
(
|
||||
$this->buildBody()
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user