mirror of
				https://github.com/antd-tiny-vue/antd-tiny-vue.git
				synced 2025-10-31 16:51:45 +08:00 
			
		
		
		
	feat: add button
This commit is contained in:
		
							
								
								
									
										13
									
								
								components/button/button.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								components/button/button.tsx
									
									
									
									
									
										Normal 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 | ||||
							
								
								
									
										8
									
								
								components/button/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								components/button/index.ts
									
									
									
									
									
										Normal 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 | ||||
		Reference in New Issue
	
	Block a user