fastadmin搜索模板自定义添加

  • Post author:
  • Post category:其他


//js代码
 {
     field: 'o.area', title: __('地区'), searchList: function (column) {
          return Template('categorytpl', {});
     }, formatter: function (value, row, index) {
          return '无';
     }, visible: false
 },

//如果是三级那种,比较长的,需要调整样式
$('#area-select').parent('div').parent('div').css("z-index", "9999");


//html代码
<script id="categorytpl" type="text/html">
    <div class="row" id = 'area-select'>
        <div class="form-inline" data-toggle="cxselect" data-selects="first,second,third">
            <select class="first form-control" name="province" data-url="ajax/areaByPid?pid=0"></select>
            <select class="second form-control" name="city" data-url="ajax/areaByPid"
                    data-query-name="pid"></select>
            <select class="third form-control" name="area" data-url="ajax/areaByPid"
                    data-query-name="pid"></select>
            <input type="hidden" class="operate" data-name="area" value="=" />

        </div>
    </div>
</script>




版权声明:本文为qq_29107923原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。