From f4991944d13b94355fb8aaf03dad7d60ca530ee9 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Thu, 30 Nov 2023 16:36:45 +0800
Subject: [PATCH] fix:是否修改

---
 uni_modules/uview-ui/components/u-line/u-line.vue |   62 +++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/uni_modules/uview-ui/components/u-line/u-line.vue b/uni_modules/uview-ui/components/u-line/u-line.vue
new file mode 100644
index 0000000..e0a6d92
--- /dev/null
+++ b/uni_modules/uview-ui/components/u-line/u-line.vue
@@ -0,0 +1,62 @@
+<template>
+	<view
+	    class="u-line"
+	    :style="[lineStyle]"
+	>
+
+	</view>
+</template>
+
+<script>
+	import props from './props.js';
+	/**
+	 * line ������
+	 * @description ���������������������������������������������������������������������������������������������������������������0.5px���������������������������
+	 * @tutorial https://www.uviewui.com/components/line.html
+	 * @property {String}			color		��������������� ( ������ '#d6d7d9' )
+	 * @property {String | Number}	length		���������������������������������������������������������������������������������������px��������������� ( ������ '100%' )
+	 * @property {String}			direction	������������������row-���������col-������ (������ 'row' )
+	 * @property {Boolean}			hairline	��������������������� (������ true )
+	 * @property {String | Number}	margin		������������������������������������������������������������"30px"  (������ 0 )
+	 * @property {Boolean}			dashed		���������������true-���������false-������ (������ false )
+	 * @property {Object}			customStyle	���������������������������������
+	 * @example <u-line color="red"></u-line>
+	 */
+	export default {
+		name: 'u-line',
+		mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
+		computed: {
+			lineStyle() {
+				const style = {}
+				style.margin = this.margin
+				// ���������������������������������������1px������������transform���������������������0.5px���
+				if (this.direction === 'row') {
+					// ������������������������������������nvue���������
+					style.borderBottomWidth = '1px'
+					style.borderBottomStyle = this.dashed ? 'dashed' : 'solid'
+					style.width = uni.$u.addUnit(this.length)
+					if (this.hairline) style.transform = 'scaleY(0.5)'
+				} else {
+					// ���������������������������������������1px������������transform���������������������0.5px���
+					style.borderLeftWidth = '1px'
+					style.borderLeftStyle = this.dashed ? 'dashed' : 'solid'
+					style.height = uni.$u.addUnit(this.length)
+					if (this.hairline) style.transform = 'scaleX(0.5)'
+				}
+
+				style.borderColor = this.color
+				return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle))
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+
+	.u-line {
+		/* #ifndef APP-NVUE */
+		vertical-align: middle;
+		/* #endif */
+	}
+</style>

--
Gitblit v1.8.0