子组件
<div style
="margin-top:20px;font-size:14px;">
<span
>已经拥有账户
?</span
>
<span
> <el
-button type
="text" @click
="handleClick()">登录
</el
-button
> </span
>
</div
>
handleClick(){
this.$emit("childValue",false)
}
点击按钮,子组件向父组件传值,值发生变化
父组件
<div
class="login-right" v
-if="isShow" >
<Passin v
-else v
-on
:childValue
="update"/>
</div
>
methods
:{
update(e
) {
},
}
转载请注明原文地址: https://lol.8miu.com/read-14046.html