Skip to content

Commit

Permalink
Update dom-ref example for Vue 3 (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzjiaxiang authored Sep 8, 2024
1 parent 2bd86a0 commit 0441bc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/2-templating/5-dom-ref/vue3/InputFocused.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup>
import { ref, onMounted } from "vue";
import { useTemplateRef, onMounted } from "vue";
const inputElement = ref();
const inputElement = useTemplateRef("inputElement");
onMounted(() => {
inputElement.value.focus();
Expand Down

0 comments on commit 0441bc9

Please sign in to comment.