|
|
@@ -1,9 +1,9 @@
|
|
|
<script setup lang="ts">
|
|
|
-import { Data } from '@vue/shared'
|
|
|
+import type { Data } from '@vue/runtime-shared'
|
|
|
import { ref, onMounted } from 'vue/vapor'
|
|
|
|
|
|
-const inputRef = ref()
|
|
|
-const buttonRef = ref()
|
|
|
+const inputRef = ref<HTMLInputElement>()
|
|
|
+const buttonRef = ref<HTMLButtonElement>()
|
|
|
|
|
|
function handleSetRef(el: HTMLButtonElement, refs: Data) {
|
|
|
buttonRef.value = el
|
|
|
@@ -18,6 +18,7 @@ onMounted(() => {
|
|
|
<template>
|
|
|
<div>
|
|
|
<input type="text" ref="inputRef" />
|
|
|
+ <!-- @vue-expect-error TODO fix types -->
|
|
|
<button :ref="handleSetRef">Button</button>
|
|
|
</div>
|
|
|
</template>
|