From 1e61215b48e59e94c1ed98e4ef956227d689d6bc Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Mon, 06 Nov 2023 08:48:39 +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