<template>
    <!-- 排序题 -->
    <div>
        <basic-edit hide-placeholder></basic-edit>
        <option-edit prop="value"></option-edit>
        <verify-edit></verify-edit>
    </div>
</template>

<script>
export default {
    name: 'FormSort',
    components: {
        BasicEdit: () => import('@/common/formDesign/components/formEdit/components/BasicEdit'),
        OptionEdit: () => import('@/common/formDesign/components/formEdit/components/OptionEdit'),
        VerifyEdit: () => import('@/common/formDesign/components/formEdit/components/VerifyEdit')
    },
    data () {
        return {
            formItem: this.$store.state.form.formItem
        }
    },
    created () {
        this.init()
    },
    methods: {
        // 初始化
        init () {
            if (!this.formItem.value) {
                this.$set(this.formItem, 'value', [
                    { name: '选项 1', value: '' },
                    { name: '选项 2', value: '' },
                    { name: '选项 3', value: '' }
                ])
            }
        }
    }
}
</script>

<style lang="less" scoped>
</style>
