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-scroll-list/nvue.js |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/uni_modules/uview-ui/components/u-scroll-list/nvue.js b/uni_modules/uview-ui/components/u-scroll-list/nvue.js
new file mode 100644
index 0000000..94bb056
--- /dev/null
+++ b/uni_modules/uview-ui/components/u-scroll-list/nvue.js
@@ -0,0 +1,28 @@
+// ������bindingx���������������������������������wxs���������������js���������������������������������������������������������������
+const BindingX = uni.requireNativePlugin('bindingx')
+
+export default {
+    methods: {
+        // ������������������������������������
+        nvueScrollHandler(e) {
+            const anchor = this.$refs['u-scroll-list__scroll-view'].ref
+            const element = this.$refs['u-scroll-list__indicator__line__bar'].ref
+            const scrollLeft = e.contentOffset.x
+            const contentSize = e.contentSize.width
+            const { scrollWidth } = this
+            const barAllMoveWidth = this.indicatorWidth - this.indicatorBarWidth
+            // ������������iOS������������������������������������iOS������������2
+            const actionNum = uni.$u.os() === 'ios' ? 2 : 1
+            const expression = `(x / ${actionNum}) / ${contentSize - scrollWidth} * ${barAllMoveWidth}`
+            BindingX.bind({
+                anchor,
+                eventType: 'scroll',
+                props: [{
+                    element,
+                    property: 'transform.translateX',
+                    expression
+                }]
+            })
+        }
+    }
+}

--
Gitblit v1.8.0