From c0666f255399bd19a4c52388762d05eb20a2f555 Mon Sep 17 00:00:00 2001 From: zhuzhengjian Date: Fri, 17 Mar 2023 15:53:26 +0800 Subject: [PATCH] feat: add button style --- components/button/button.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/button/button.tsx b/components/button/button.tsx index 4115ff8..50d7755 100644 --- a/components/button/button.tsx +++ b/components/button/button.tsx @@ -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()