From c180bf24fc49fd9d63a0163f2f9d68440d2957f4 Mon Sep 17 00:00:00 2001 From: lz-lee <296452017@qq.com> Date: Wed, 28 Feb 2018 12:10:32 +0800 Subject: [PATCH] update readme --- README.md | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9eed093..c8097fa 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ - 此外获取引用的常见方法: - - 获取 `refs`:以下方式均可以通过 `this.refs.input` 获取 + - 元素获取 `refs`:以下方式均可以通过 `this.refs.input` 获取 ``` this.input = input}> @@ -114,9 +114,43 @@ ``` + - 父组件获取子组件 `refs`, 给子组件传递一个值为函数的引用 + + ``` + function Child(props) { + return ( +