Closed
Description
Version
3.0.0
Reproduction link
Steps to reproduce
I have the same doubts as this issue. I don't know why the document said there was such a syntax, but the questions were closed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://unpkg.com/vue@next"></script>
</head>
<body>
<div id="app"></div>
<script>
Vue.createApp({
setup(){
let a = Vue.ref(0);
let b = Vue.ref(0);
return ()=>Vue.h(
"div",
[
Vue.h("button", { onClick: () => a.value }, `function: ${a.value}`),
Vue.h("button", { onClick: {handler: () => b.value } }, `object: ${b.value}`)
]
)
}
}).mount("#app");
</script>
</body>
</html>
What is expected?
The object syntax for events works in the render function.
What is actually happening?
It doesn't work.
Metadata
Metadata
Assignees
Labels
No labels