|
@@ -55,7 +55,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view v-else class="uni-date-range--x" :style="pickerPositionStyle">
|
|
<view v-else class="uni-date-range--x" :style="pickerPositionStyle">
|
|
|
- <view class="uni-popper__arrow"></view>
|
|
|
|
|
|
|
+ <view class="uni-popper__arrow" :style="arrowPositionStyle"></view>
|
|
|
<view v-if="hasTime" class="popup-x-header uni-date-changed">
|
|
<view v-if="hasTime" class="popup-x-header uni-date-changed">
|
|
|
<view class="popup-x-header--datetime">
|
|
<view class="popup-x-header--datetime">
|
|
|
<input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.startDate"
|
|
<input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.startDate"
|
|
@@ -200,6 +200,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
pickerVisible: false,
|
|
pickerVisible: false,
|
|
|
pickerPositionStyle: null,
|
|
pickerPositionStyle: null,
|
|
|
|
|
+ arrowPositionStyle: null,
|
|
|
isEmitValue: false,
|
|
isEmitValue: false,
|
|
|
isPhone: false,
|
|
isPhone: false,
|
|
|
isFirstShow: true,
|
|
isFirstShow: true,
|
|
@@ -468,6 +469,23 @@ export default {
|
|
|
platform() {
|
|
platform() {
|
|
|
if (typeof navigator !== "undefined") {
|
|
if (typeof navigator !== "undefined") {
|
|
|
this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1
|
|
this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1
|
|
|
|
|
+ let windowWidth = 0;
|
|
|
|
|
+ // #ifdef H5
|
|
|
|
|
+
|
|
|
|
|
+ if (typeof window !== 'undefined') {
|
|
|
|
|
+ windowWidth = window.innerWidth
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
|
|
+
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ // @ts-ignore
|
|
|
|
|
+ if (typeof uni !== 'undefined' && uni.getSystemInfoSync) {
|
|
|
|
|
+ // @ts-ignore
|
|
|
|
|
+ const systemInfo = uni.getSystemInfoSync()
|
|
|
|
|
+ windowWidth = systemInfo.windowWidth
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ this.windowWidth = windowWidth
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
@@ -480,6 +498,7 @@ export default {
|
|
|
windowWidth
|
|
windowWidth
|
|
|
} = uni.getSystemInfoSync()
|
|
} = uni.getSystemInfoSync()
|
|
|
// #endif
|
|
// #endif
|
|
|
|
|
+ console.log(windowWidth,'windowWidth')
|
|
|
this.isPhone = windowWidth <= 500
|
|
this.isPhone = windowWidth <= 500
|
|
|
this.windowWidth = windowWidth
|
|
this.windowWidth = windowWidth
|
|
|
},
|
|
},
|
|
@@ -502,6 +521,10 @@ export default {
|
|
|
dateEditor.boundingClientRect(rect => {
|
|
dateEditor.boundingClientRect(rect => {
|
|
|
if (this.windowWidth - rect.left < this.datePopupWidth) {
|
|
if (this.windowWidth - rect.left < this.datePopupWidth) {
|
|
|
this.pickerPositionStyle.right = 0
|
|
this.pickerPositionStyle.right = 0
|
|
|
|
|
+ this.arrowPositionStyle = {
|
|
|
|
|
+ right: '10%',
|
|
|
|
|
+ left: 'initial',
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}).exec()
|
|
}).exec()
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|