<template>
    <div>
        <el-form>
        <compa v-bind:model="model.a" />
        <compb v-bind:model="model.b" />
        <compc ref="compc"/>
        </el-form>
        <p>
            {{model.a.val+"||"+model.b.val}}
        </p>
        <c-button @click="getcompc">按钮</c-button>
    </div>
</template>

<script>
import CompA from './CompA'
import CompB from './CompB'
import CompC from "./CompC"
export default {
    components:{
        compa:CompA,
        compb:CompB,
        compc:CompC
    },
    computed: {

    },
    data(){
        return {
                model:{
                    a:{val:'a'},
                    b:{val:'b'}
                }

            }
    },
    methods:{
        getcompc:function(){
            console.log(JSON.stringify(this.$refs.compc.model))
            console.log(123456);
        }
    }
}
</script>