From ec763e1cb7dca873caf4afbc0dfde047b51753d3 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 17 十月 2025 17:26:54 +0800
Subject: [PATCH] 2025.10.17
---
src/components/BaseCard.vue | 44 ++++++++++++++++++++++++++++++++++++++------
1 files changed, 38 insertions(+), 6 deletions(-)
diff --git a/src/components/BaseCard.vue b/src/components/BaseCard.vue
index a24f197..baf7fd2 100644
--- a/src/components/BaseCard.vue
+++ b/src/components/BaseCard.vue
@@ -6,6 +6,12 @@
<slot name="content"></slot>
</div>
</div>
+ <div class="ff-footer">
+ <slot name="footer"></slot>
+ </div>
+ <div v-if="type == 'content' && size == 'medium'" class="ff-triangle">
+ <div class="ff-triangle-border"></div>
+ </div>
</div>
</template>
@@ -14,8 +20,16 @@
export default {
props: {
/**
+ * 绫诲瀷
+ * content | btn
+ */
+ type: {
+ type: String,
+ default: 'content'
+ },
+ /**
* 鏍峰紡鎶樿澶у皬
- * small | medium
+ * small | medium | middle-s
*/
size: {
type: String,
@@ -23,19 +37,37 @@
},
/**
* 鏍峰紡鏈濆悜
- * left | right
+ * content: left | right | top-left | down
+ * btn: left | right | down
*/
direction: {
type: String,
default: 'left'
+ },
+ /**
+ * 閫夋嫨鏃犺竟妗嗘柟鍚�
+ * r锛堝彸渚ф棤杈规锛� | t锛堥《閮ㄦ棤杈规锛�
+ */
+ borderless: {
+ type: String
}
},
computed: {
wrapClz() {
- let clz = 'ff-content fy-container';
- clz += ` ff-content-${this.size}`;
- clz += ` ff-content-${this.direction}`;
- return clz;
+ if (this.type == 'content') {
+ let clz = 'ff-content p-events-auto';
+ clz += ` ff-content-${this.direction}`;
+ clz += ` ff-content-${this.size}`;
+ clz += `${this.borderless ? '-borderless-' + this.borderless : ''}`;
+ return clz;
+ } else if (this.type == 'btn') {
+ let clz = 'ff-toggle-btn p-events-auto';
+ clz += ` ff-toggle-btn-${this.direction}`;
+ clz += ` ff-btn-${this.size}`;
+ return clz;
+ } else {
+ return '';
+ }
}
}
};
--
Gitblit v1.9.3