mirror of
https://github.com/antd-tiny-vue/antd-tiny-vue.git
synced 2025-01-10 16:19:08 +08:00
feat: add button style
This commit is contained in:
parent
6c7f67df60
commit
c0666f2553
@ -7,6 +7,10 @@ const Button = defineComponent({
|
||||
props: {
|
||||
prefixCls: {
|
||||
type: String
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'default'
|
||||
}
|
||||
},
|
||||
setup(props, { slots, attrs }) {
|
||||
@ -16,6 +20,7 @@ const Button = defineComponent({
|
||||
return () => {
|
||||
const cls = {
|
||||
[prefixCls.value]: true,
|
||||
[`${prefixCls.value}-${props.type}`]: !!props.type,
|
||||
[hashId.value]: true
|
||||
}
|
||||
return wrapSSR(<button class={[cls, attrs.class]}>{slots.default?.()}</button>)
|
||||
|
Loading…
Reference in New Issue
Block a user