Skip to content

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

Open
Open
@webfanrc

Description

@webfanrc
import { emit } from "process"
import { defineComponent, h } from "vue"

export default defineComponent({
  name: 'MyButton',
  props:{
    disabled:{
      default:'false',
      type:Boolean
    }
  },
  render(context) {
    return h('button', {
      onclick: () => context.$emit('custom-click')
    }, context.$slots)
  }
})

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions