## 其他控件 - segment: 分割线 - password: 密码 - status: 状态 - tpl: 模块 - 页面分组: Tab标签 #### 示例效果:路径/ht/other ![](https://img.kancloud.cn/14/1d/141d6294094cdca2eee26dab1a4d8884_550x318.png) 数据设置 ~~~ <?php return [ 'type' => 'sql', 'config' => [ 'table' => 'other' ], ]; ~~~ 列表设置 ~~~ <?php return [ 'field' => [ 'id' => [ 'width' => 30, 'fixed' => true ], 'username' => ['search' => true], 'status' => ['search' => true, 'list' => [ // 设置搜索筛选 '0' => '禁用', '1' => '启用' ] ] ], 'handle' => [ 's_1' => ['type' => 'segment', 'name' => '登录验证'], //分割线 'username', 'password' => [ //密码模式 'type' => 'password', // 'md5' => true // md5加密模式 ], 'status' => ['type' => 'status', 'value' => '1'], //状态模式 'my_tpl' => ['type' => 'tpl', 'tpl' => 'my_tpl'], //模块指向,相对路径,指向该目录下的my_tpl模块 'my_tp2' => ['type' => 'tpl', 'tpl' => '/www/demo/admin/ht/other/my_tpl'], //模块指向,绝对路径,可夸项目访问 'my_tp3' => ['type' => 'tpl', 'tpl' => '../other/my_tpl'], //模块指向,相对路径,指向上一级目录下的other文件夹中的my_tpl模块 's_2' => ['type' => 'segment', 'name' => 'SEO'], //分割线 'title', 'keywords', 'description', 's_3' => ['type' => 'segment', 'name' => '其他'], //分割线 'other_1', 'other_2', ], 'handleinfo' => [ 'width' => 800, 'height' => 600 ], 'is' => [ 'add' => true, 'delete' => true ] ]; ~~~ 数据库设置 ![](https://img.kancloud.cn/12/aa/12aad38c4a6f5188ffe124240ff4dd50_940x229.png) 点击:后台模块 > 其他控件 ![](https://img.kancloud.cn/d6/2c/d62cba429d2801b43d892cfed1bdb2b0_1264x770.gif) 密码不加密效果 ![](https://img.kancloud.cn/df/76/df76828e9eba7fa94ddc4cfa491cf408_939x858.png) md5加密效果 ![](https://img.kancloud.cn/45/ce/45ce89053debfcee11a404363b441a00_937x828.png) - md5加密效果:不显示明文到输入框,需要输入两次确认,如果不输入则不更改密码 不加密数据: ![](https://img.kancloud.cn/6d/d8/6dd8a6725c35e975f14c695fdd65a354_863x68.png) 加密数据: ![](https://img.kancloud.cn/7d/1b/7d1b3e1ea49ed4669bf9bf3774d07a3b_946x66.png) #### 分组:Tab标签 #### 示例效果:路径/ht/other/group ![](https://img.kancloud.cn/e4/7d/e47d58928aeaac181388f33aa29a7c21_545x350.png) 数据设置 ~~~ <?php return [ 'type' => 'sql', 'config' => [ 'table' => 'other' ], ]; ~~~ 列表设置 ~~~ <?php return [ 'field' => [ 'id' => [ 'width' => 30, 'fixed' => true ], 'username' => ['search' => true], 'status' => ['search' => true, 'list' => [ '0' => '禁用', '1' => '启用' ] ] ], 'handle' => [ // 默认为:基本设置 's_1' => ['type' => 'segment', 'name' => '登录验证'], 'username', 'password' => [ 'type' => 'password', ], 'status' => ['type' => 'status', 'value' => '1'], // 分组模块:模块 'my_tpl' => ['type' => 'tpl', 'tpl' => '../my_tpl', 'group' => '模块'], //模块指向,相对路径,指向上级目录下的my_tpl模块 // 分组模块:SEO 's_2' => ['type' => 'segment', 'name' => 'SEO', 'group' => 'SEO'], 'title' => ['group' => 'SEO'], 'keywords' => ['group' => 'SEO'], 'description' => ['group' => 'SEO'], // 分组模块:其他 'other_1' => ['group' => '其他'], 'other_2' => ['group' => '其他'], ], 'handleinfo' => [ 'width' => 800, 'height' => 600 ], 'is' => [ 'add' => true, 'delete' => true ] ]; ~~~ 点击:后台模块 > 其他控件(分组) ![](https://img.kancloud.cn/aa/f5/aaf59ab1bce2354a1dea8861f23ebe59_1083x681.gif) Tab分解图 ![](https://img.kancloud.cn/12/6a/126a2b5ce33c6160bc7d31fda40d93ce_801x382.png) ![](https://img.kancloud.cn/97/f2/97f297ee33d848dc47e8cbff1aea7adb_800x382.png) ![](https://img.kancloud.cn/1f/b1/1fb19f0ba0cea2cbb7f601f603681a11_799x385.png) ![](https://img.kancloud.cn/cc/a6/cca6194eebb9dd9737b2d5fb1fdbe429_800x382.png)