# # 拖拽表单设计

## # 设计

     sex:{ //sex表示该input的name
            type:"input", //表单类型，有input,select,checkbox.
            label:'', //该input的标签
            value:'', //该input或的值
            disabled:false,//该input是否禁用,在流程中方便控制
            readOnly:false,//该input是否为只读,在流程中方便控制
            attr:''  //自定义属性，待定
            flowVar:''//流程变量，后台服务定义，比如${creator},${creatorDept},${deptLeader},${deptName}
    },

1
2
3
4
5
6
7
8
9
10

    <template>
      <div>
        <a-tabs :activ-key="activeKey">
          <a-tab-pane :key="1" tab="设计" force-render>
            <design-widget></design-widget>
          </a-tab-pane>
          <a-tab-pane :key="2" tab="JSON" force-render>
            <json-widget></json-widget>
          </a-tab-pane>
          <span slot="tabBarExtraContent" class="tab-extra" >
            <span>
               <a-button  size="small">清空</a-button>
            </span>
            <span>
              <a-button  size="small">预览</a-button>
            </span>
          </span>
        </a-tabs>
      </div>
    </template>

    <script>
    import designWidget from './design'
    import jsonWidget from './json'
    export default {
      name:'design-panel',
      components:{
        designWidget,
        jsonWidget
      },
      data(){
        return {
          activeKey:1
        }
      }
    }
    </script>
    <style lang="less">
    .tab-extra{
      margin-right: 180px;
      span {
        padding:0 20px;
      }

    }
    </style>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47