addTopButtons 的自定义按钮如何跳转一个现有的地址

->addTopButton('custom', $excel_demo_access) // 下载模板
 $excel_demo_access = [
            'title' => '下载模板',
            'icon'  => 'fa fa-fw fa-arrow-down',
            'href'  => 'baidu.com'
        ];
我需要点击这个按钮就在新窗口打开百度 怎么实现?
已邀请:

dolphinphp

赞同来自:

添加target属性即可
$excel_demo_access = [
'title' => '下载模板',
'icon' => 'fa fa-fw fa-arrow-down',
'href' => 'baidu.com',
'target' => '_blank'
];

要回复问题请先登录注册