* zin: auto set key for tabPane.
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user