Compare commits

..

5 Commits

Author SHA1 Message Date
zhuzhengjian 71244b2086 feat: add button 2023-03-08 16:10:20 +08:00
yanyu 74bb3d43c2 feat: add ant-design theme 2023-03-06 07:30:21 +08:00
yanyu 8222f10259 feat: add delete button 2023-03-06 07:29:33 +08:00
yanyu 770471fc3d feat: add basic 2023-03-06 07:28:23 +08:00
yanyu 9603871a40 feat: add theme 2023-03-05 22:23:19 +08:00
5 changed files with 33 additions and 7 deletions
+9
View File
@@ -0,0 +1,9 @@
import { defineComponent } from 'vue'
export default defineComponent({
name: 'AButton',
setup(props, { slots }) {
return () => {
return <button>{slots.default?.()}</button>
}
}
})
+8
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
+1
View File
@@ -0,0 +1 @@
export { default as Button } from './button'
+13 -5
View File
@@ -1,7 +1,15 @@
export {}
import type { App, Plugin } from 'vue'
import * as components from './components'
import version from './version'
export * from './components'
const aaa = () => {
// TODO
export default {
install(app: App) {
Object.values(components).forEach(component => {
if (component.install) {
app.use(component as any)
}
export default aaa
})
},
version
} as Plugin
+1 -1
View File
@@ -10,7 +10,7 @@ title: 基础按钮
<script lang="ts" setup></script>
<template>
<div>按钮</div>
<div></div>
</template>
<style scoped></style>