1、子组件无法直接修改父组件的值
2、需要子组件主动调用父组件的方法,让父组件自己去修改自己的值
child.vue
<template>
<div class="child">
<h5>子组件</h5>
<button @click="addn">调用父组件的方法修改父组件的值</button>
1、子组件无法直接修改父组件的值
2、需要子组件主动调用父组件的方法,让父组件自己去修改自己的值
child.vue
<template>
<div class="child">
<h5>子组件</h5>
<button @click="addn">调用父组件的方法修改父组件的值</button>