jQuery MiniUI
标题:
mini-outlooktree可以直接引用现成树型结构的json数据不?
[打印本页]
作者:
joyoes
时间:
2018-2-8 23:47:38
标题:
mini-outlooktree可以直接引用现成树型结构的json数据不?
[
0 => [
'id' => '1'
'text' => '职业培训'
'visible' => 'active'
'icon' => 'icon wb-library'
'items' => [
0 => [
'id' => '3'
'text' => '计划管理'
'url' => '/training/batch/index'
'pid' => '1'
'icon' => 'fa fa-circle-o'
]
1 => [
'id' => '2'
'text' => '培训管理'
'pid' => '1'
'icon' => 'fa fa-circle-o'
'items' => [
0 => [
'id' => '4'
'text' => '培训报名'
'url' => '/training/default/train-reg'
'pid' => '2'
'icon' => 'fa fa-circle-o'
]
1 => [
'id' => '9'
'text' => '测试菜单'
'pid' => '2'
'icon' => 'fa fa-circle-o'
'items' => [
0 => [
'id' => '10'
'text' => '测试链接'
'url' => '/training/batch/batch-publish'
'pid' => '9'
'icon' => 'fa fa-circle-o'
]
1 => [
'id' => '11'
'text' => '测试链接1'
'url' => '/training/default/train-reg-end'
'pid' => '9'
'icon' => 'fa fa-circle-o'
]
]
]
]
]
]
]
1 => [
'id' => '5'
'text' => '系统设置'
'visible' => ''
'icon' => 'icon wb-settings'
'items' => [
0 => [
'id' => '6'
'text' => '用户管理'
'url' => '/systemmanage/default/user-manage'
'pid' => '5'
'icon' => 'fa fa-circle-o'
]
1 => [
'id' => '7'
'text' => '用户授权'
'url' => '/admin/user/activate'
'pid' => '5'
'icon' => 'fa fa-circle-o'
]
2 => [
'id' => '8'
'text' => '修改密码'
'url' => '/admin/user/change-password'
'pid' => '5'
'icon' => 'fa fa-circle-o'
]
]
]
2 => [
'id' => '12'
'text' => '公文管理'
'visible' => ''
'icon' => 'icon wb-settings'
'items' => [
0 => [
'id' => '15'
'text' => '发布公文'
'url' => '/document/default/documentsend'
'pid' => '12'
'icon' => 'fa fa-circle-o'
]
1 => [
'id' => '16'
'text' => '项目管理'
'url' => '/document/project/projectadd'
'pid' => '12'
'icon' => 'fa fa-circle-o'
]
]
]
]
复制代码
作者:
dforce
时间:
2018-2-9 10:02:21
本帖最后由 dforce 于 2018-2-9 10:05 编辑
支持的,我们有属性resultAsTree来控制,根据你的数据的格式来,
如果你的数据是树形的话,可以设置resultAsTree="true".
另外我们的树形结构是这样的json格式由children字段来放下一级数据
{id:"',text:"",children:[
{},{},{}
]
}
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2