<template>
  <div class="dynamic-form">
    <h4>组件属性</h4>
     <Form ref="formCustom" :label-width="80" :model="form">
      <FormItem :label="item.name" :key="index" v-for="(item, index) in curElement.schame">
          <component :is="item.type" v-model="form[item.key]" @on-change="change" />
      </FormItem>
    </Form>
    <!-- <h4>基础样式</h4>
    <Form ref="formCustom" :label-width="80">
      <FormItem label="文本内容">
          <Input type="text" text></Input>
      </FormItem>
    </Form> -->
  </div> 
</template>
<script lang="ts" src="./index.ts"></script>
<style lang="less">
	.dynamic-form {
	    padding: 0 15px;
	    h4 {
	      padding: 10px 0;
	      margin-bottom: 10px;
	      border-bottom: 1px solid #ebeef5;
	    }
	    /deep/ .ivu-form-item-label {
	      font-size: 14px;
	    }
	}
</style>