* zin: auto set key for tabPane.

This commit is contained in:
sunhao
2024-01-30 11:46:10 +08:00
parent 485efd62c5
commit a36edb0abb
+10 -1
View File
@@ -5,7 +5,7 @@ namespace zin;
class tabPane extends wg
{
protected static array $defineProps = array(
'key: string',
'key?: string',
'title?: string',
'active?: bool=false',
'param?: string'
@@ -17,6 +17,15 @@ class tabPane extends wg
'divider' => false
);
protected function created()
{
$key = $this->prop('key');
if(is_null($key)) $key = $this->gid;
else $key = $this->gid . '-' . $key;
$this->setProp('key', $key);
}
protected function build(): wg
{
$key = $this->prop('key');