vuejs-challenges icon indicating copy to clipboard operation
vuejs-challenges copied to clipboard

218 - 渲染函数[h()]

Open undefined-zzk opened this issue 1 year ago • 0 comments

// 你的答案

import { defineComponent,h } from "vue"

export default defineComponent({ name: 'MyButton', render({$attrs,$emit,$slots}) { return h('button',{ props:{ ...$attrs }, onClick:()=> $emit('custom-click') },$slots) } })

undefined-zzk avatar Jan 28 '24 09:01 undefined-zzk