From da25434b85fc5b4321c429bf95e719d00ec395bb Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Thu, 11 Jan 2024 16:21:16 +0800
Subject: [PATCH] 定位优化
---
uni_modules/uview-ui/components/u-slider/mpwxs.js | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/uni_modules/uview-ui/components/u-slider/mpwxs.js b/uni_modules/uview-ui/components/u-slider/mpwxs.js
new file mode 100644
index 0000000..f263911
--- /dev/null
+++ b/uni_modules/uview-ui/components/u-slider/mpwxs.js
@@ -0,0 +1,42 @@
+export default {
+ data() {
+ return {
+ sliderRect: {},
+ info: {
+ width: null,
+ left: null,
+ step: this.step,
+ disabled: this.disabled,
+ min: this.min,
+ max: this.max,
+ value: this.value
+ }
+ }
+ },
+ mounted() {
+ this.init()
+ },
+ methods: {
+ init() {
+ this.getSliderRect()
+ },
+ // ������slider������
+ getSliderRect() {
+ // ������������������������������
+ uni.$u.sleep().then(() => {
+ this.$uGetRect('.u-slider').then((rect) => {
+ this.info.width = rect.width
+ this.info.left = rect.left
+ })
+ })
+ },
+ // ������������wxs���������������������v-model������������
+ updateValue(value) {
+ this.$emit('input', value)
+ },
+ // ������������wxs���������������������
+ emitEvent(e) {
+ this.$emit(e.event, e.value ? e.value : this.value)
+ }
+ }
+}
--
Gitblit v1.8.0