vue subassembly acquired parent element method
this.$emit("searchhide");
vue subassembly parent component data acquired
Parent component
<child :trust-plan-id-list="data"></child>
- Declare and use the variables in the sub-assembly
declared in the props, and then you can directly use it
props:[
"trustPlanIdList"
],
Gets the parent component method:
this.$parent.methods
Obtain properties of the parent component:
this.$parent.options
Gets the parent component sub-assembly method
<search ref="search" v-show="!blurBgShow" @searchshow="rankshow=false" @searchhide="rankshow=true"></search>
Acquiring property subcomponents:
this.$refs.search.searchShow