1.定义查询过滤条件,查询指定数据用于选择
(1)定义data-params单种类条件
data-params='{"custom[type_pid]":"0"}'
(2)定义data-params查询判断语法条件
data-params='{"custom[type_pid][0]":"not in","custom[type_pid][1]":"0"}'
(3)定义非默认主键值
data-primary-key="type_id"
完整示例:
<input id="c-type_id" data-rule="required" data-source="mac_type/index" data-field="type_name" data-params='{"custom[type_pid][0]":"not in","custom[type_pid][1]":"0"}' data-primary-key="type_id" class="form-control selectpage" name="row[type_id]" type="text" value="{$row.type_id|htmlentities}">