feat: add button

This commit is contained in:
zhuzhengjian
2023-03-08 16:10:20 +08:00
parent 74bb3d43c2
commit 71244b2086
4 changed files with 32 additions and 6 deletions

View File

@ -0,0 +1,9 @@
import { defineComponent } from 'vue'
export default defineComponent({
name: 'AButton',
setup(props, { slots }) {
return () => {
return <button>{slots.default?.()}</button>
}
}
})

View File

@ -0,0 +1,8 @@
import type { App } from 'vue'
import Button from './button'
Button.install = function (app: App) {
app.component(Button.name, Button)
}
export default Button