首页 > 代码库 > YII2 全局设定 默认参数

YII2 全局设定 默认参数

        $gridviewSettings = [
            ‘export‘ => false,
            ‘responsive‘ => true,
            ‘floatHeader‘ => true,
            ‘floatHeaderOptions‘ => [‘scrollingTop‘ => 88],
            ‘hover‘ => true,
            ‘pjax‘ => true,
            ‘pjaxSettings‘ => [
                ‘options‘ => [
                    ‘id‘ => ‘grid-pjax‘,
                ],
            ],
            ‘resizableColumns‘ => false,
        ];

        Yii::$container->set(‘kartik\grid\GridView‘, $gridviewSettings);

  

YII2 全局设定 默认参数