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