uni-app $refs的基本用法

时间:2025-02-18 14:25:19
<template> <view class="container"> <child :showModal="showModal" ref="vref"></child> <button @tap="refMethods" type="primary" >点击</button> </view> </template> <script> import child from "../../components/" export default { components: { child }, data() { return { showModal: " parent say", parentValue: '', syncDate: ' p syncDate' }; }, methods: { refMethods() { var child = this.$; (); } } } </script> <style> </style>