diff --git a/src/api/component-instance.md b/src/api/component-instance.md index 5d11d8020d..9ea82779c6 100644 --- a/src/api/component-instance.md +++ b/src/api/component-instance.md @@ -42,7 +42,7 @@ The root DOM node that the component instance is managing. ```ts interface ComponentPublicInstance { - $el: Node | undefined + $el: any } ``` diff --git a/src/guide/extras/render-function.md b/src/guide/extras/render-function.md index f6386f39d8..6ac7142e43 100644 --- a/src/guide/extras/render-function.md +++ b/src/guide/extras/render-function.md @@ -721,6 +721,21 @@ export default { } ``` +or (with version >= 3.5) + +```js +import { h, useTemplateRef } from 'vue' + +export default { + setup() { + const divEl = useTemplateRef('my-div') + + //