vuejs-challenges
vuejs-challenges copied to clipboard
218 - 渲染函数[h()] setup写法
import { h, defineComponent } from "vue"
export default defineComponent({
setup:
(_, { slots, emit }) => () =>
h('button', {
onClick: () => emit('custom-click')
}, slots.default())
});