标签:mod class his 数据 rip ext watch div nbsp
<Child @getChildValue="getChildValue"></Child>
<template> <div class="child"> <p>子组件同步数据到父组件</p> <input type="text" v-model="childValue"> </div> </template> <script> export default { data(){ return{ childValue:‘‘ } }, watch: { childValue(val){ this.$emit("getChildValue",{value:this.childValue}) } }, } </script>
标签:mod class his 数据 rip ext watch div nbsp
原文地址:https://www.cnblogs.com/mmzuo-798/p/11607079.html