Skip to content

218 - 渲染函数[h()] #2269

Open
Open
@nsnans

Description

@nsnans
import { defineComponent, h } from "vue"

export default defineComponent({
  name: 'MyButton',
  render() {

    return h('button',
      {
        ... this.$attrs,
        onClick: () => this.$emit('custom-click')
      },
      this.$slots
    )
  }
})

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions