+ zin: add thinkstepdetail wg.

This commit is contained in:
Zhangyu
2024-04-18 02:25:53 +00:00
parent ad9892fa3b
commit d79c4887a9
2 changed files with 69 additions and 0 deletions
+1
View File
@@ -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());}
+68
View File
@@ -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()
);
}
}