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-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