Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
34benma opened this issue Aug 17, 2024 · 0 comments
Open

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

34benma opened this issue Aug 17, 2024 · 0 comments

Comments

@34benma
Copy link

34benma commented Aug 17, 2024

import { h } from 'vue'
export default function button(p, { emit, slots }) {
  return h(
    'button',
    {
      ...p,
      onclick: () => {
        emit('custom-click')
      },
    },
    slots.default()
  )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant