From 9e12e03bb923a199052e2c105e09a5b4f5a097df Mon Sep 17 00:00:00 2001
From: Rewrite0 <49576640+Rewrite0@users.noreply.github.com>
Date: Sun, 21 May 2023 22:49:14 +0800
Subject: [PATCH] ab-button add new prop: link
---
src/basic/ab-button.vue | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/src/basic/ab-button.vue b/src/basic/ab-button.vue
index 4a5bbdc1..48f03ae3 100644
--- a/src/basic/ab-button.vue
+++ b/src/basic/ab-button.vue
@@ -3,25 +3,41 @@ const props = withDefaults(
defineProps<{
type?: 'primary' | 'warn';
size?: 'big' | 'normal' | 'small';
+ link?: string | null;
}>(),
{
type: 'primary',
size: 'normal',
+ link: null,
}
);
defineEmits(['click']);
+
+const buttonSize = computed(() => {
+ switch (props.size) {
+ case 'big':
+ return 'rounded-10px text-h1 w-276px h-55px';
+ case 'normal':
+ return 'rounded-6px w-170px h-36px';
+ case 'small':
+ return 'rounded-6px w-86px h-28px';
+ }
+});
-
+