[Yii2标签内容一页

问题描述 投票:0回答:2

在我的view.php中

<?php echo Tabs::widget([
    'items' => [
        [
            'label' => 'One',
            'content' => 'Anim pariatur cliche...',
            'active' => true
        ],
        [
            'label' => 'Two',
            'content' => 'Anim pariatur cliche...',
            'headerOptions' => [...],
            'options' => ['id' => 'myveryownID'],
        ],
?>

<div class="row" id="content1">
...some html...
</div>

<div class="row" id="content2">
...some html...
</div>

如何将id="content1"传递到Tabs::widget(['items' =>['label' => 'one', 'content' => $content1]])

所以我可以在每个内容中通过id调用它。也许通过id使用pjax,但仍然不知道如何

谢谢

php yii2 tabs pjax
2个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.