Yii2 带标签的分页

Yii2 Pagination with Tabs

我在一页上有 5 个标签。所有选项卡都有不同的内容,但其中一个选项卡我需要分页。单击分页时,页面刷新,当前打开的选项卡关闭,默认情况下显示第一个选项卡...我希望单击分页时,当前选项卡打开,并且仅刷新包含数据信息的部分。 这是我的代码:

  <?php
            Pjax::begin([
            'id' => 'w0',
            'enablePushState' => true,  // I would like the browser to change link
            'timeout' => 10000 // Timeout needed
        ]);  
            $spec = Specifications::find()->where('active = 1')->orderBy(['sort' => SORT_ASC]);
            $count = $spec->count();
            $pagination = new Pagination(['totalCount' => $count, 'defaultPageSize' => 20]);
            $models = $spec->offset($pagination->offset)
                            ->limit($pagination->limit)
                            ->all();



               echo LinkPager::widget([
                  'pagination' => $pagination,
                  'hideOnSinglePage' => true,
                  'prevPageLabel' => 'Предишна',
                  'nextPageLabel' => 'Следваща'
               ]);

            if ($spec) { ?>
                <div class="form-group">
                    <label>Спецификации</label></br>
                    <?php
                    foreach ($models as $singleSpec) {
                        echo $singleSpec->id." ".$singleSpec->title;
                    }
                    ?>
                </div>
            <?php } ?>
            <?php Pjax::end() ?>

从 Pjax 中删除 'id'=>'w0',它正在刷新您的页面