vue3 tsx 使用事件修饰符 ts2322 错误?

<div onTouchstartPassive={onTouchstartPassive}></div>

TS2322: Type '{ ref: Ref<HTMLElement | undefined>; class: unknown[]; onTouchstartPassive: (event: TouchEvent) => void; onTouchend: () => void; onTouchcancel: () => void; }' is not assignable to type 'ElementAttrs<HTMLAttributes>'.
  Property 'onTouchstartPassive' does not exist on type 'ElementAttrs<HTMLAttributes>'.

但是运行 yarn lint 并没有错误提示, 请问这是为什么呢?

参考文档:https://cn.vuejs.org/guide/ex...

阅读 3k
1 个回答
推荐问题
logo
Microsoft
子站问答
访问
宣传栏