-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Closed
Description
Version
3.0.0
Reproduction link
https://codepen.io/waantony/pen/BaKMbxr
Steps to reproduce
Click the button and nothing happened.
<!DOCTYPE html>
<html>
<head>
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/vue@3.0.0/dist/vue.global.js"></script>
</head>
<body>
<div id="app"></div>
<script>
const { h, createApp } = Vue
createApp({
render () {
return h('button', {
// This is OK!
// onClick: () => {
// console.log('onClick', 'OK')
// },
// This doesn't work!
onClick: {
handler () {
console.log('onClick', 'OK')
},
},
}, 'click')
},
}).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.
eliot-ye
Metadata
Metadata
Assignees
Labels
No labels