From dbccfc04eb5a927d690bb75277f614e63d4544c9 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Wed, 21 Jan 2026 15:54:13 +0800
Subject: [PATCH] 适配64位
---
uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
index bd96488..8769e83 100644
--- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
@@ -450,6 +450,10 @@
right.setDate(this.$refs.right.nowDate.fullDate)
},
platform() {
+ if(typeof navigator !== "undefined"){
+ this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1
+ return
+ }
const { windowWidth } = uni.getSystemInfoSync()
this.isPhone = windowWidth <= 500
this.windowWidth = windowWidth
@@ -460,7 +464,9 @@
}
this.platform()
if (this.isPhone) {
- this.$refs.mobile.open()
+ setTimeout(() => {
+ this.$refs.mobile.open()
+ }, 0);
return
}
this.pickerPositionStyle = {
--
Gitblit v1.9.2