DictSelect (数据字典下拉选择框) **示例:** ``` <t:dictSelect field="sex" typeGroupCode="sex" title="性别"></t:dictSelect> ``` **参数:** | 属性名| 类型| 描述| 是否必须| 默认值| | -------- | ----- | ---- | | title| string| 标题| 否| null| | field| string| 控件字段名字| 是| null| | typeGroupCode| string| 字典分组编码| 是| null| | type| string| 控件类型select、radio、checkbox| 否| select| | id| string| 唯一标识| 否| null| | defaultVal| string| 默认值| 否| null| | divClass| string| DIV框默认样式| 否| form| | labelClass| string| LABEL默认样式| 否| Validform_label| | dictTable| string| 自定义字典表| 否| null| | dictField| string| 自定义字典表的匹配字段-字典的编码值| 否| null| | dictText| string| 自定义字典表的显示文本-字典的显示值| 否| null| | dictCondition| string| 自定义字典表的显示文本-字典查询条件| 否| null| | extendJson| string| 扩展参数(json格式)| 否| null| | hasLabel| boolean| 是否显示Label| 否| FALSE| | readonly| string| 是否可编辑。当值”readonly”时不可编辑。| 否| null| | datatype| string| validform校验规则,一般必须输入:*| 否| null| **DEMO代码:** 1、通过设定typeGroupCode为数据字典的编码实现radio: ``` <t:dictSelect field="sex" type="radio" typeGroupCode="sex" hasLabel="false" title="性别" defaultVal="1"></t:dictSelect> ``` 2、通过设定typeGroupCode为数据字典的编码实现select: ``` <t:dictSelect field="sex" type="select" typeGroupCode="sex" hasLabel="false" title="性别" defaultVal="1"></t:dictSelect> ``` 3、通过设定typeGroupCode为数据字典的编码实现checkbox: ``` <t:dictSelect field="dbtype" type="checkbox" typeGroupCode="dbtype" hasLabel="false" title="数据库类型" defaultVal="oracle,mysql"></t:dictSelect> ``` 4、设置关联表实现select【配置规则:dictTable为数据库表名;dictField为关联字段名;dictText为展示字段名;dictCondition可配置查询条件】 ``` <t:dictSelect field="name" defaultVal="1" dictTable="t_s_base_user" dictCondition="where delete_flag=0" dictField="username" dictText="realname" title="用户"></t:dictSelect> ``` **DEMO效果:** 如何加js事件,onclick事件举例 ``` <t:dictSelect id="sexid" field="sex" type="radio" typeGroupCode="sex" hasLabel="false" title="性别" /> ``` 通过jQuery实现事件 ``` $("#sexid").click(function(){ alert('点击我。。。'); }); ```