覆盖侧栏
假如已经有侧栏内容,该内容是来自其他模块的,你想在自己的模块中完全覆盖原来的内容,可以添加一个指令”new“。
$settings = [['title' => '站点开关','tips' => '站点关闭后将不能访问','checked' => Db::name('admin_config')->where('id', 1)->value('value'),'table' => 'admin_config','id' => 1,'field' => 'value']];// 使用ZBuilder快速创建数据表格return ZBuilder::make('aside', 'new')->addBlock('switch', '系统设置', $settings);
这样的话,侧栏内容只会显示你设置的内容。
