From 6e3943e10faf9aaf7ec08a15e5e237dfe470757f Mon Sep 17 00:00:00 2001 From: NataliaTepluhina Date: Sun, 14 Jun 2020 16:21:33 +0300 Subject: [PATCH 1/3] feat: added template refs --- src/.vuepress/config.js | 5 +-- src/api/composition-api.md | 2 +- src/api/instance-properties.md | 4 +-- src/api/special-attributes.md | 2 +- src/guide/component-template-refs.md | 46 ++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 src/guide/component-template-refs.md diff --git a/src/.vuepress/config.js b/src/.vuepress/config.js index b41320971d..5462d06178 100644 --- a/src/.vuepress/config.js +++ b/src/.vuepress/config.js @@ -25,7 +25,9 @@ const sidebar = { '/guide/component-props', '/guide/component-custom-events', '/guide/component-slots', - '/guide/component-provide-inject' + '/guide/component-provide-inject', + '/guide/component-dynamic-async', + '/guide/component-template-refs' ] }, { @@ -33,7 +35,6 @@ const sidebar = { collapsable: false, children: [ '/guide/reactivity', - '/guide/component-dynamic-async', '/guide/optimizations', '/guide/change-detection' ] diff --git a/src/api/composition-api.md b/src/api/composition-api.md index ef4843c068..1c8841ab58 100644 --- a/src/api/composition-api.md +++ b/src/api/composition-api.md @@ -291,7 +291,7 @@ const foo = inject('foo') // string | undefined ## Template Refs -When using the Composition API, the concept of [reactive refs](./refs-api.html#ref) and [template refs](TODO) are unified. In order to obtain a reference to an in-template element or component instance, we can declare a ref as usual and return it from `setup()`: +When using the Composition API, the concept of [reactive refs](./refs-api.html#ref) and [template refs](../guide/component-template-refs.html) are unified. In order to obtain a reference to an in-template element or component instance, we can declare a ref as usual and return it from `setup()`: ```html