<style></style>

<template>
    <!-- 动态生成对应组件 -->
    <component :is="currentComponent" :config="config"/>
</template>

<script>
import SrpLabel from './srpElement/label';

export default {
    name: "SrpElement",
    components: {
        SrpLabel,
    },
    props: {
        config: Object,
        type: String,
    },
    data() {
        return {};
    },
    computed: {
        currentComponent() {
            let formatName = this.type.charAt(0).toUpperCase() + this.type.slice(1)
            return 'Srp' + formatName;
        }
    }
}
</script>
