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

218 - 渲染函数[h()] setup写法

Open Tofu-Xx opened this issue 5 months ago • 1 comments

import { h, defineComponent } from "vue"

export default defineComponent({
  setup:
    (_, { slots, emit }) => () =>
      h('button', {
        onClick: () => emit('custom-click')
      }, slots.default())
});

Tofu-Xx avatar Sep 15 '24 19:09 Tofu-Xx