Skip to content

Commit

Permalink
Update dom-ref example for Vue 3 (matschik#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
lainbo committed Sep 15, 2024
1 parent 29379c6 commit bbbe268
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/2-模板语法/5-DOM引用/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 bbbe268

Please sign in to comment.