<template>
  <el-form-item
    class="item"
    v-bind="{...$attrs, ...$props}"
  >
    <span class="name">输入内容</span>
    <slot/>
  </el-form-item>
</template>
<script>
export default {
  name: 'form-item',
  mounted() {
    console.log(this)
  }
}
</script>
<style lang="less" scoped>
.item{
  position: relative;
  .name{
    position: absolute;
    font-size: 12px;
    background-color: #fff;
    padding: 3px;
    top: -12px;
    max-width: 90%;
    margin: 0 5%;
    z-index: 1;
    height: 20px;
    display: inline-block;
    line-height: 20px;
    color: #13817a;
  }
}
</style>
