php ROUTER_LIST
<h4>源格式</h4>
<pre><code class="language-php">ROUTER_LIST = [
[
'title' => 'Dashboard',
'key' => 'Home',
'icon' => 'icon-monitor',
'authLevel'=>0, //0=公开,1=登录,2=角色
'menuItem'=>true,//是否主菜单项
'vauth'=>[
['key'=>'k1','title'=>'添加按钮'],
['key'=>'k2','title'=>'编辑按钮'],
['key'=>'k3','title'=>'删除按钮']
],
'apis'=>[
'api/aaa/bbb',
'api/aaa/ccc',
'api/ddd/eee',
]
],
[
'title' => 'Icons',
'key' => 'Icons',
'icon' => 'icon-heart',
'vauth'=>[
['key'=>'1','title'=>'字段1'],
['key'=>'2','title'=>'字段2'],
['key'=>'3','title'=>'字段3']
],
'apis'=>[
'api/aaa/bbb',
'api/aaa/ccc',
'api/ddd/eee',
]
],
[
'title' => '列表应用',
'key' => 'tablelist',
'icon' => 'icon-grid',
'vauth'=>[
['key'=>'1','title'=>'添加按钮'],
['key'=>'2','title'=>'删除按钮'],
],
'apis'=>[
'api/aaa/bbb',
'api/aaa/ccc',
'api/ddd/eee',
]
],
[
'title' => '表单应用',
'key' => 'form-folder',
'icon' => 'icon-paper',
'children' => [
[
'title' => '基础表单',
'key' => 'Form',
],
[
'title' => '表单详情',
'key' => 'FormDetail',
],
],
],
[
'title' => '模糊匹配',
'key' => 'AutoComplete-folder',
'icon' => 'icon-disc',
'children' => [
[
'title' => '模糊搜索',
'key' => 'Autocomplete1',
],
[
'title' => '场景应用',
'key' => 'Autocomplete2',
],
[
'title' => '复杂场景',
'key' => 'Autocomplete3',
],
],
],
[
'title' => '扩展组件',
'key' => 'Advance-folder',
'icon' => 'icon-bar-graph-2',
'children' => [
[
'title' => '图表',
'key' => 'Chart',
],
[
'title' => '富文本编辑器',
'key' => 'RicktextEditor',
],
[
'title' => '代码编辑器',
'key' => 'CodeEditor',
],
[
'title' => 'Markdown编辑器',
'key' => 'MarkdownEditor',
], [
'title' => '百度地图',
'key' => 'BaiduMap',
],
],
],
[
'title' => '系统设置',
'key' => 'SysSetting',
'icon' => 'icon-cog',
'children' => [
[
'title' => '个人中心',
'key' => 'AccountBasic',
],
[
'title' => '安全设置',
'key' => 'SecuritySetting',
],
[
'title' => '权限设置',
'key' => 'Authorization',
],
[
'title' => '用户管理',
'key' => 'Users',
],
],
],
];</code></pre>
<h4>控制器输出的json</h4>
<pre><code class="language-json">[{
"title": "Dashboard",
"key": "Home",
"icon": "icon-monitor",
"authLevel": 0,
"menuItem": true,
"vauth": [{
"key": "k1",
"title": "添加按钮"
},
{
"key": "k2",
"title": "编辑按钮"
},
{
"key": "k3",
"title": "删除按钮"
}],
"apis": ["api/aaa/bbb", "api/aaa/ccc", "api/ddd/eee"]
},
{
"title": "Icons",
"key": "Icons",
"icon": "icon-heart",
"vauth": [{
"key": "1",
"title": "字段1"
},
{
"key": "2",
"title": "字段2"
},
{
"key": "3",
"title": "字段3"
}],
"apis": ["api/aaa/bbb", "api/aaa/ccc", "api/ddd/eee"]
},
{
"title": "列表应用",
"key": "tablelist",
"icon": "icon-grid",
"vauth": [{
"key": "1",
"title": "添加按钮"
},
{
"key": "2",
"title": "删除按钮"
}],
"apis": ["api/aaa/bbb", "api/aaa/ccc", "api/ddd/eee"]
},
{
"title": "表单应用",
"key": "form-folder",
"icon": "icon-paper",
"children": [{
"title": "基础表单",
"key": "Form"
},
{
"title": "表单详情",
"key": "FormDetail"
}]
},
{
"title": "模糊匹配",
"key": "AutoComplete-folder",
"icon": "icon-disc",
"children": [{
"title": "模糊搜索",
"key": "Autocomplete1"
},
{
"title": "场景应用",
"key": "Autocomplete2"
},
{
"title": "复杂场景",
"key": "Autocomplete3"
}]
},
{
"title": "扩展组件",
"key": "Advance-folder",
"icon": "icon-bar-graph-2",
"children": [{
"title": "图表",
"key": "Chart"
},
{
"title": "富文本编辑器",
"key": "RicktextEditor"
},
{
"title": "代码编辑器",
"key": "CodeEditor"
},
{
"title": "Markdown编辑器",
"key": "MarkdownEditor"
},
{
"title": "百度地图",
"key": "BaiduMap"
}]
},
{
"title": "系统设置",
"key": "SysSetting",
"icon": "icon-cog",
"children": [{
"title": "个人中心",
"key": "AccountBasic"
},
{
"title": "安全设置",
"key": "SecuritySetting"
},
{
"title": "权限设置",
"key": "Authorization"
},
{
"title": "用户管理",
"key": "Users"
}]
}]</code></pre>
<h4>角色表中router_power的保存格式</h4>
<pre><code class="language-json">{
"Home": ["k1", "k2", "k3"],
"Icons": ["1", "2", "3"],
"tablelist": ["1", "2"],
"Form": [],
"FormDetail": [],
"form-folder": [],
"Autocomplete1": [],
"Autocomplete2": [],
"Autocomplete3": [],
"AutoComplete-folder": [],
"Chart": [],
"RicktextEditor": [],
"CodeEditor": [],
"MarkdownEditor": [],
"BaiduMap": [],
"Advance-folder": [],
"AccountBasic": [],
"SecuritySetting": [],
"Authorization": [],
"Users": [],
"SysSetting": []
}
</code></pre>