fix(playground): import type error (#219)
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
This commit is contained in:
parent
b5ecb72864
commit
ca61022e69
|
@ -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>
|
||||
|
|
|
@ -13,7 +13,7 @@ const remaining = computed(() => {
|
|||
return tasks.value.filter(task => !task.completed).length
|
||||
})
|
||||
|
||||
function handleAdd(evt: MouseEvent) {
|
||||
function handleAdd(evt: KeyboardEvent | MouseEvent) {
|
||||
console.log(evt)
|
||||
tasks.value.push({
|
||||
title: value.value,
|
||||
|
|
Loading…
Reference in New Issue