<template>
    <div style="width:100%">
        <div class="item-style">
            <i-switch v-model="value"></i-switch>
        </div>
        <div v-show="value">
            <div class="title-style">校验</div>
            <validateArr></validateArr>
        </div>
    </div>
</template>

<script>
    import * as components from './style';
    import {PropertyMixin} from '../../service/main-tool-editor-type-mixin';
    import validateArr from '../main-tool-editor-type-box-validateArr';

    export default {
        components: {
            ...components,
            validateArr
        },
        mixins: [PropertyMixin],
        position: 'mainToolEditorTypeRadioHeightLevel',
        name: 'main-tool-editor-type-radioHeightLevel',
        data() {
            return {
                value: this.editor.value || false
            };
        },
        mounted() {
            this.initCurrtField();
            this.setInstanceProps(this.value);
        },
        computed: {
            getRomout() {
                let currentInstance = this.$store.state.viewport.instances.get(this.$store.state.viewport.currentEditInstanceKey);
                //note 为事件新增一项
                if (!currentInstance.data.property.dynamic) {
                    currentInstance.data.property.dynamic = {
                        label: "",
                        value: "",
                        url: "",
                        paramsList: []
                    };
                }
                return currentInstance.data.property.dynamic;
            },
            applicationState() {

                return this.$store.state.application;
            },
            viewportState() {
                return this.$store.state.viewport;
            }
        },
        methods: {
            changeVal(el) {

                debugger;
            },
            handleChange() {

            }
        },
        watch: {
            getRomout(n, o) {

            },
            value(n, o) {
                if (n === o) {
                    return;
                }
                this.setInstanceProps(n);
            }
        }
    };
</script>

<style scoped>

</style>
