<!--
 * @FilePath: \code\Goats-Cloud-ui\src\views\big\device\components\Wform.vue
 * @Author: 王路平
 * @文件版本: V1.0.0
 * @Date: 2023-06-27 16:27:26
 * @Description: 
 * 
 * 版权信息         : 2023 by ${再登软件}, All Rights Reserved.
-->
<template>
 <el-form :model="data" :label-position="config.labelPosition">
    <el-form-item :label="item.label" v-for="item in config.formItem" :key="item.model" :label-width="item.labelWidth">
      <el-input v-if="item.content.type=='input'" v-model="data[item.content.model]"  :readonly="item.content.readonly" :disabled="item.content.disabled"/>
    </el-form-item>
  </el-form>
</template>

<script setup lang="ts">
import {ref} from "vue"
const prop = defineProps({
    config: {
        type: Object,
        default: {
            labelPosition:'top',
            formItem:[{
            label:'默认',
            labelWidth:'120px',
            content:{
                type:'input',
                model:"name",
                readonly:true,
                disabled:true,
            }
            }]
        },
    },
    data: {
        type: Object,
        default: {
            name:''
        },
    }
})
</script>

<style lang="scss" scoped>

</style>
