## 其他控件
- segment: 分割线
- password: 密码
- status: 状态
- tpl: 模块
- 页面分组: Tab标签
#### 示例效果:路径/ht/other
![](/static/plugins/tphp/backstage/example/list_other/menu.png)
数据设置
```
<?php
return [
'type' => 'sql',
'method' => 'list',
'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
]
];
```
数据库设置
![](/static/plugins/tphp/backstage/example/list_other/table.png)
点击:后台模块 > 其他控件
![](/static/plugins/tphp/backstage/example/list_other/demo.gif)
密码不加密效果
![](/static/plugins/tphp/backstage/example/list_other/edit.png)
md5加密效果
![](/static/plugins/tphp/backstage/example/list_other/edit_password.png)
- md5加密效果:不显示明文到输入框,需要输入两次确认,如果不输入则不更改密码
不加密数据:
![](/static/plugins/tphp/backstage/example/list_other/table2.png)
加密数据:
![](/static/plugins/tphp/backstage/example/list_other/table3.png)
#### 分组:Tab标签
#### 示例效果:路径/ht/other/group
![](/static/plugins/tphp/backstage/example/list_other/group_menu.png)
数据设置
```
<?php
return [
'type' => 'sql',
'method' => 'list',
'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
]
];
```
点击:后台模块 > 其他控件(分组)
![](/static/plugins/tphp/backstage/example/list_other/demo2.gif)
Tab分解图
![](/static/plugins/tphp/backstage/example/list_other/pwd_edit.png)
![](/static/plugins/tphp/backstage/example/list_other/pwd_edit2.png)
![](/static/plugins/tphp/backstage/example/list_other/seo.png)
![](/static/plugins/tphp/backstage/example/list_other/other.png)