~~~
//構建頁面
return $this->TBuilder('custom',$this) ->addTopBarMenus([
['title' => '表頭','href'=>url('',['step'=>1]) ],
['title' => '內容','is_active' => true],
['title' => '分析','href'=>url('',['step'=>3]) ],
['title' => '外觀','href'=>url('',['step'=>4]) ],
['title' => '提交后','href'=>url('',['step'=>5]) ],
['title' => '全局設置','href'=>url('',['step'=>6]) ],
['title' => '發布','href'=>url('',['step'=>7]) ],
])
->addTopBarButton([
'type' => 'edit',
'title' => '上一步',
'item_class'=> '',
'attr' => ['target-form'=>'form-horizontal-topic'],
'icon_class'=> 'fa fa-arrow-left',
'href' => 'javascript:;',
])
->addTopBarButton([
'type' => 'edit',
'title' => '下一步',
'item_class'=> '',
'attr' => ['target-form'=>'form-horizontal-topic'],
'icon_class'=> 'fa fa-arrow-right',
'href' => 'javascript:;',
])
->addTopBarButton([
'type' => 'edit',
'title' => '保存',
'item_class'=> 'btn-primary ajax-post save_project_edit',
'attr' => ['target-form'=>'form-horizontal-topic'],
'icon_class'=> 'fa fa-floppy-o',
'href' => 'javascript:;',
])
->setCustomView( $projectEditGroupInfo['custom_view'] )
->recordWidgets([['art-template'],['mCustomScrollbar']])
->hideFooter()
->assign( ['list'=>$list] )
->fetch();
~~~
**addTopBarMenus**方法用于設置topbar頂部菜單

### 高亮規則
一、控制器(CN)、方法(AN)匹配
~~~
addTopBarMenus([
['title' => '選擇明細視圖','href' => url('answer/showAnswerDetail',['answer_id'=>$answer_id] ),'active_rule'=>'AN','active_val'=>'showAnswerDetail' ],
['title' => '分值統計視圖','href' => url('answer/showAnswerStatistics',['answer_id'=>$answer_id] ),'active_rule'=>'AN','active_val'=>'showAnswerStatistics' ],
])
~~~
二、url參數匹配
~~~
addTopBarMenus([
['title' => '表頭','href'=>url('',['step'=>1]) ,'active_key'=>'step','active_val'=>'1' ],
['title' => '內容','href'=>url('',['step'=>2]) ,'active_key'=>'step','active_val'=>'2' ],
])
~~~
三、指定
~~~
addTopBarMenus([
['title' => '表頭','href'=>url('',['step'=>1]) ],
['title' => '內容','is_active' => true],
])
~~~
### 設置topbar右側按鈕
**addTopBarButton**方法用于設置topbar右側按鈕
~~~
->addTopBarButton([
'type' => 'edit',
'title' => '上一步',
'item_class'=> 'hide',
'attr' => ['target-form'=>'form-horizontal-topic'],
'icon_class'=> 'fa fa-arrow-left',
'href' => 'javascript:;',
])
->addTopBarButton([
'type' => 'edit',
'title' => '下一步',
'item_class'=> 'hide',
'attr' => ['target-form'=>'form-horizontal-topic'],
'icon_class'=> 'fa fa-arrow-right',
'href' => 'javascript:;',
])
->addTopBarButton([
'type' => 'edit',
'title' => '保存',
'item_class'=> 'btn-primary ajax-post save_project_edit no-refresh',
'attr' => ['target-form'=>'form-horizontal'],
'icon_class'=> 'fa fa-floppy-o',
'href' => 'javascript:;',
])
~~~

- 序言
- 環境搭建
- 下載及安裝
- 構建器
- 構建器概述
- 模版構建器(TBuilder)
- Tab組件
- Topbar組件
- 按鈕
- 頂部按鈕配置
- 按鈕配置明細
- 表格(table)
- Table案例
- 「方法」加載數據
- 「方法」設置數據列
- 「方法」列排序
- 「組件」檢索過濾器
- 「組件」頂部按鈕
- 「組件」列表按鈕
- 「配置」列快速編輯
- 「配置」列附加內容
- 「配置」顯隱列表復選框
- 「配置」自定義樣式
- 表單(form)
- Form案例
- 「方法」添加組件(addWidgets)
- 「方法」數據檢索過濾(filter)
- 「組件」富文本編輯器(kindeditor|editormd)
- 「組件」圖片組件(images|cropper)
- 「組件」select listbox組件(listbox)
- 「組件」顏色選擇器(button_color)
- 「組件」自定義內容
- 「配置」顯隱字段關聯(open_by)
- 「配置」form布局(layoutView)
- 「配置」隱藏描述區(hideWidgetsDesc)
- 「配置」數據驗證(validate)
- 「配置」隱藏表單底部按鈕(hideFormButton)
- 「配置」字段tip提示(tip)
- 自定義頁面(custom)
- Custom案例
- 「組件」echart
- 「組件」Tile Widgets
- 「配置」custom布局
- 「配置」自定義html內容
- 「配置」自定義提醒頁面
- 樹形(tree)
- Tree案例
- 左側菜單區配置
- 關閉左側菜單(hideLeftMenu)
- 頂部按鈕配置
- 自定義菜單配置
- 展現方式配置
- 表內增刪改(Tabullet)
- 通用設置
- 依賴文件加載(插件/js/css)
- 指定布局/模版
- 內容定位欄(setTrayMenu)
- 設置內容區側欄
- 模態框打開頁面
- 組件構建器(TWidget)
- echarts
- table
- form組件
- Tabs組件
- builder構建
- titleLine
- 數據構建器(DBuilder)
- 概述(案例)
- 「方法」獲取單條記錄詳情
- 「方法」獲取分頁列表數據
- 「方法」排序
- 「方法」設置查詢字段
- 「方法」快速編輯
- 「方法」數據導出
- 「方法」聯表查詢
- 「方法」查詢數據再處理
- 「配置」回調處理
- 「配置」設置過濾字段
- 「配置」指定過濾字段匹配值
- 「配置」增加編輯支持
- 「配置」查詢出全部數據
- 輔助類
- Excle
- 模塊開發
- 插件開發
- 擴展
- 行為擴展
- 行為日志
- 雜項
- 圖片異步加載
- jquery插件zeroModal
- 提示
- form表單驗證
- ajax相關
- 展開收起
- 常用函數
- 其他插件
- DEMO
- 增刪改查
- 安全
- XSS 攻擊
- 注入攻擊
- CSRF 攻擊
- 其他攻擊和漏洞
- 開發
- TBuilder組件開發
- 更新日志
- 關于文檔