时间:2021-07-01 10:21:17 帮助过:41人阅读
AccountModel = ->field('id,code,name,islast')->( & = (['code'( == 3['pid'] = 0['pid'] = (['code'],0,-2 ->createTree( createSubTree(, = ( =>(['pid'] == = 'id' => ['id'], 'text'=>['name'], 'state'=>(['islast'] != 1)?'closed':'open'(['islast'] != 1 = ->createSubTree(,['code'(!(['children'] = (, createTree( = ( => (['pid'] == 0 = 'id' => ['id'], 'text'=>['name'], 'state'=>'closed' = ->createSubTree(,['code'(!(['children'] = [] =
类似上述的数据(如部门,地区等)需要构建树形菜单的简单修改代码后基本都能实现类似功能。
以上就是ThinkPHP+EasyUI的实例讲解的详细内容,更多请关注Gxl网其它相关文章!