<#assign col1 = col>
{
  "id": "${newId()}",
  "type": "fx-form-panel",
  "shape": "panel",
  "props": {
     "size": "0",
     "paddingTop": 15,
     "colNum": 2
  },
  "children": [
    <#list dfields as dfield>
    {
      "id": "id${newId()}",
      <#if (dfield.readonly = true)>
      "type": "fx-text",
      <#else>
      "type": "${dfield.editor}",
      </#if>
      "props": {
        "label": "${dfield.label}",
        "type": "${dfield.editor}",
        "dataset": "${dfield.dataset}",
        "field": "${dfield.id}",
        "required": "${dfield.required}",
        <#if dfield.lookup??>
            "lookup": {
            <#list dfield.lookup as k, v>
                <#if v?is_enumerable>
                    "${k}": [
                    <#list v as v1>
                        {
                        <#list v1 as vk1, vv1>
                            "${vk1}": "${vv1}"<#if vk1_has_next>,</#if>
                        </#list>
                        }
                        <#if v1_has_next>,</#if>
                    </#list>
                    ]
                <#else>
                    "${k}": "${v}"
                </#if>
                <#if k_has_next>,</#if>
            </#list>
             },
        </#if>
        <#if dfield.maxlength gt 0>
        "maxlength": ${dfield.maxlength},
        </#if>
        "placeholder": "请输入内容",
        <#if (col1 gte 2)>
        "tips": "${dfield.desc}",
        </#if>
        "labelWidth": 100,
        <#if (dfield.readonly = true)>
        "readonly": true,
        <#else>
        "readonly": false,
        </#if>
        "affixError": true
       },
       "events": {}
      }
      <#if dfield_has_next>

      <#if (col1 lte 1 )>
      <#if (dfield.desc != "")>
        ,{
        "id": "id${newId()}",
        "type": "fx-label",
        "props": {
          "label": "${dfield.desc}",
           "labelWidth": 0,
           "affixError": true,
           "labelAlign": "left"
         }
        }
      <#else>
        ,{
        "id": "id${newId()}",
        "type": "fx-placeholder",
        "props": {
          "label": "占位"
        },
        "layout": {
          "row": 1
         }
        }
      </#if>
     </#if>
        ,
    </#if>

  </#list>
 ]
}
