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/libs/css/common.scss |  177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 177 insertions(+), 0 deletions(-)

diff --git a/uview-ui/libs/css/common.scss b/uview-ui/libs/css/common.scss
new file mode 100644
index 0000000..12f39d5
--- /dev/null
+++ b/uview-ui/libs/css/common.scss
@@ -0,0 +1,177 @@
+.u-relative,
+.u-rela {
+	position: relative;
+}
+
+.u-absolute,
+.u-abso {
+	position: absolute;
+}
+
+// nvue涓嶈兘鐢ㄦ爣绛惧懡鍚嶆牱寮忥紝涓嶈兘鏀惧湪寰俊缁勪欢涓紝鍚﹀垯寰俊寮�鍙戝伐鍏蜂細鎶ヨ鍛婏紝鏃犳硶浣跨敤鏍囩鍚嶅綋鍋氶�夋嫨鍣�
+/* #ifndef APP-NVUE */
+image {
+	display: inline-block;
+}
+
+// 鍦╳eex锛屼篃鍗硁vue涓紝鎵�鏈夊厓绱犻粯璁や负border-box
+view,
+text {
+	box-sizing: border-box;
+}
+/* #endif */
+
+.u-font-xs {
+	font-size: 22rpx;
+}
+
+.u-font-sm {
+	font-size: 26rpx;
+}
+
+.u-font-md {
+	font-size: 28rpx;
+}
+
+.u-font-lg {
+	font-size: 30rpx;
+}
+
+.u-font-xl {
+	font-size: 34rpx;
+}
+
+.u-flex {
+	/* #ifndef APP-NVUE */
+	display: flex;
+	/* #endif */
+	flex-direction: row;
+	align-items: center;
+}
+
+.u-flex-wrap {
+	flex-wrap: wrap;
+}
+
+.u-flex-nowrap {
+	flex-wrap: nowrap;
+}
+
+.u-col-center {
+	align-items: center;
+}
+
+.u-col-top {
+	align-items: flex-start;
+}
+
+.u-col-bottom {
+	align-items: flex-end;
+}
+
+.u-row-center {
+	justify-content: center;
+}
+
+.u-row-left {
+	justify-content: flex-start;
+}
+
+.u-row-right {
+	justify-content: flex-end;
+}
+
+.u-row-between {
+	justify-content: space-between;
+}
+
+.u-row-around {
+	justify-content: space-around;
+}
+
+.u-text-left {
+	text-align: left;
+}
+
+.u-text-center {
+	text-align: center;
+}
+
+.u-text-right {
+	text-align: right;
+}
+
+.u-flex-col {
+	/* #ifndef APP-NVUE */
+	display: flex;
+	/* #endif */
+	flex-direction: column;
+}
+
+// 瀹氫箟flex绛夊垎
+@for $i from 0 through 12 {
+	.u-flex-#{$i} {
+		flex: $i;
+	}
+}
+
+// 瀹氫箟瀛椾綋(px)鍗曚綅锛屽皬浜�20閮戒负px鍗曚綅瀛椾綋
+@for $i from 9 to 20 {
+	.u-font-#{$i} {
+		font-size: $i + px;
+	}
+}
+
+// 瀹氫箟瀛椾綋(rpx)鍗曚綅锛屽ぇ浜庢垨绛変簬20鐨勯兘涓簉px鍗曚綅瀛椾綋
+@for $i from 20 through 40 {
+	.u-font-#{$i} {
+		font-size: $i + rpx;
+	}
+}
+
+// 瀹氫箟鍐呭杈硅窛锛屽巻閬�1-80
+@for $i from 0 through 80 {
+	// 鍙鍙屾暟鍜岃兘琚�5闄ゅ敖鐨勬暟
+	@if $i % 2 == 0 or $i % 5 == 0 {
+		// 寰楀嚭锛歶-margin-30鎴栬�卽-m-30
+		.u-margin-#{$i}, .u-m-#{$i} {
+			margin: $i + rpx!important;
+		}
+		
+		// 寰楀嚭锛歶-padding-30鎴栬�卽-p-30
+		.u-padding-#{$i}, .u-p-#{$i} {
+			padding: $i + rpx!important;
+		}
+		
+		@each $short, $long in l left, t top, r right, b bottom {
+			// 缂╁啓鐗堬紝缁撴灉濡傦細 u-m-l-30
+			// 瀹氫箟澶栬竟璺�
+			.u-m-#{$short}-#{$i} {
+				margin-#{$long}: $i + rpx!important;
+			}
+			
+			// 瀹氫箟鍐呰竟璺�
+			.u-p-#{$short}-#{$i} {
+				padding-#{$long}: $i + rpx!important;
+			}
+			
+			// 瀹屾暣鐗堬紝缁撴灉濡傦細u-margin-left-30
+			// 瀹氫箟澶栬竟璺�
+			.u-margin-#{$long}-#{$i} {
+				margin-#{$long}: $i + rpx!important;
+			}
+			
+			// 瀹氫箟鍐呰竟璺�
+			.u-padding-#{$long}-#{$i} {
+				padding-#{$long}: $i + rpx!important;
+			}
+		}
+	}
+}
+
+// 閲嶇疆nvue鐨勯粯璁ゅ叧浜巉lex鐨勬牱寮�
+.u-reset-nvue {
+	flex-direction: row;
+	align-items: center;
+}
+

--
Gitblit v1.9.3