From f26f29d84e0a68831a6af14dab3eec5500496d2e Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 28 五月 2025 16:48:52 +0800
Subject: [PATCH] 初始化项目

---
 uview-ui/components/u-gap/u-gap.vue |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/uview-ui/components/u-gap/u-gap.vue b/uview-ui/components/u-gap/u-gap.vue
new file mode 100644
index 0000000..6c01f94
--- /dev/null
+++ b/uview-ui/components/u-gap/u-gap.vue
@@ -0,0 +1,54 @@
+<template>
+	<view class="u-gap" :style="[gapStyle]"></view>
+</template>
+
+<script>
+/**
+ * gap 闂撮殧妲�
+ * @description 璇ョ粍浠朵竴鑸敤浜庡唴瀹瑰潡涔嬮棿鐨勭敤涓�涓伆鑹插潡闅斿紑鐨勫満鏅紝鏂逛究鐢ㄦ埛椋庢牸缁熶竴锛屽噺灏戝伐浣滈噺
+ * @tutorial https://www.uviewui.com/components/gap.html
+ * @property {String} bg-color 鑳屾櫙棰滆壊锛堥粯璁�#f3f4f6锛�
+ * @property {String Number} height 鍒嗗壊妲介珮搴︼紝鍗曚綅rpx锛堥粯璁�30锛�
+ * @property {String Number} margin-top 涓庡墠涓�涓粍浠剁殑璺濈锛屽崟浣峳px锛堥粯璁�0锛�
+ * @property {String Number} margin-bottom 涓庡悗涓�涓粍浠剁殑璺濈锛屽崟浣峳px锛�0锛�
+ * @example <u-gap height="80" bg-color="#bbb"></u-gap>
+ */
+export default {
+	name: "u-gap",
+	props: {
+		bgColor: {
+			type: String,
+			default: 'transparent ' // 鑳屾櫙閫忔槑
+		},
+		// 楂樺害
+		height: {
+			type: [String, Number],
+			default: 30
+		},
+		// 涓庝笂涓�涓粍浠剁殑璺濈
+		marginTop: {
+			type: [String, Number],
+			default: 0
+		},
+		// 涓庝笅涓�涓粍浠剁殑璺濈
+		marginBottom: {
+			type: [String, Number],
+			default: 0
+		},
+	},
+	computed: {
+		gapStyle() {
+			return {
+				backgroundColor: this.bgColor,
+				height: this.height + 'rpx',
+				marginTop: this.marginTop + 'rpx',
+				marginBottom: this.marginBottom + 'rpx'
+			};
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/style.components.scss";
+</style>

--
Gitblit v1.9.3