<template>
    <!-- 基本信息 -->
    <div class="component">
        <div>
            <div class="title">标题{{ two ? ' 1' : '' }}：</div>
            <el-input v-model="formItem.title" v-bind="$store.state.form.titleAttr"></el-input>
        </div>
        <div v-if="!hideInfo && !two">
            <div class="title">标题说明：</div>
            <el-input v-model="formItem.info"></el-input>
        </div>
        <div v-if="!hidePlaceholder">
            <div class="title">提示文字：</div>
            <el-input v-model="formItem.placeholder"></el-input>
        </div>
        <template v-if="two">
            <div>
                <div class="title">标题 2：</div>
                <el-input v-model="formItem.title2" v-bind="$store.state.form.titleAttr"></el-input>
            </div>
            <div>
                <div class="title">提示文字：</div>
                <el-input v-model="formItem.placeholder2"></el-input>
            </div>
        </template>
    </div>
</template>

<script>
export default {
    props: {
        hideInfo: { type: Boolean, default: false },
        hidePlaceholder: { type: Boolean, default: false },
        two: { type: Boolean, default: false }
    },
    data () {
        return {
            formItem: this.$store.state.form.formItem
        }
    }
}
</script>

<style>

</style>
