feat: add button

This commit is contained in:
aibayanyu 2023-03-10 22:11:33 +08:00
parent a2dd8a0336
commit 1e19c7fac2
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,13 @@
import { defineComponent } from 'vue'
const Button = defineComponent({
name: 'AButton',
props: {},
setup(props, { slots }) {
return () => {
return <button>{slots.default?.()}</button>
}
}
})
export 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