1.父組件獲取子組件的數據和方法
1.調用子組件的時候 定義一個ref
<policy-info-common ref="policyInfoRef"></policy-info-common>
2.在父組件裏面通過
this.$refs.policyInfoRef.屬性
this.$refs.policyInfoRef.方法
2.子組件獲取父組件的數據和方法
this.$parent.屬性
this.$parent.方法
1.父組件獲取子組件的數據和方法
1.調用子組件的時候 定義一個ref
<policy-info-common ref="policyInfoRef"></policy-info-common>
2.在父組件裏面通過
this.$refs.policyInfoRef.屬性
this.$refs.policyInfoRef.方法
2.子組件獲取父組件的數據和方法
this.$parent.屬性
this.$parent.方法
表格: <el-table ref="tablestu" v-bind:data="tablestu.items" size="mini" fit stripe border
百度查出幾個 this.$nextTick(function () { this.$refs.tabs.$children[0].$refs.tabs[2].style.display="none
<div id="app"> <el-table ref="tabletree" size="mini" :data="data" :height="tablehe