<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 {
    name: 'Tstopn',
    components:{
        compa:CompA,
        compb:CompB,
        compc:CompC
    },
    computed: {

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

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