diff --git a/src/components/page-wraper/page-wraper.vue b/src/components/page-wraper/page-wraper.vue index 6dc559da7..a51aa7b49 100644 --- a/src/components/page-wraper/page-wraper.vue +++ b/src/components/page-wraper/page-wraper.vue @@ -1,7 +1,7 @@ - - - - {{ cancelButtonText }} + + + + + + {{ cancelButtonText }} + + + {{ JSON.stringify(title) }} + + + {{ confirmButtonText }} + - - {{ JSON.stringify(title) }} - - - {{ confirmButtonText }} + + + + 开始时间 + {{ showTabLabel[0] }} + + + 结束时间 + {{ showTabLabel[1] }} + - - - - - 开始时间 - {{ showTabLabel[0] }} + + + - - 结束时间 - {{ showTabLabel[1] }} + + - - - - - - - diff --git a/src/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue b/src/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue index a4afc31ee..a2525f44e 100644 --- a/src/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue +++ b/src/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue @@ -10,10 +10,10 @@ :modal="modal" :close-on-click-modal="closeOnClickModal" @clickmodal="close" - @beforeenter="handleOpen" - @afterenter="handleOpened" - @beforeleave="handleClose" - @afterleave="onPopupClose" + @before-enter="handleOpen" + @after-enter="handleOpened" + @before-leave="handleClose" + @after-leave="onPopupClose" > (), { const showWrapper = ref(false) const showPop = ref(false) -const position = ref('') +const position = ref() const transName = ref('') const zIndex = ref(12) const displayTitle = ref('') @@ -192,7 +193,10 @@ function close() { const positionStyle = computed(() => { let style: string = '' if (showPop.value) { - style = parent.direction === 'down' ? `top: ${parent.$.exposed.offset.value}px; bottom: 0;` : `top: 0; bottom: ${parent.$.exposed.offset.value}px` + style = + parent.direction === 'down' + ? `top: calc(var(--window-top) + ${parent.$.exposed.offset.value}px); bottom: 0;` + : `top: 0; bottom: calc(var(--window-bottom) + ${parent.$.exposed.offset.value}px)` } else { style = '' } diff --git a/src/uni_modules/wot-design-uni/components/wd-drop-menu/wd-drop-menu.vue b/src/uni_modules/wot-design-uni/components/wd-drop-menu/wd-drop-menu.vue index 5760dc8bf..b7cab1ba6 100644 --- a/src/uni_modules/wot-design-uni/components/wd-drop-menu/wd-drop-menu.vue +++ b/src/uni_modules/wot-design-uni/components/wd-drop-menu/wd-drop-menu.vue @@ -129,11 +129,6 @@ function fold(child?: any) { if (props.direction === 'down') { offset.value = bottom - // #ifdef H5 - // H5端,导航栏为普通元素,需要将组件移动到导航栏的下边沿 - // H5的导航栏高度为44px - offset.value = bottom + 44 - // #endif } else { offset.value = windowHeight.value - top } diff --git a/src/uni_modules/wot-design-uni/components/wd-notify/index.ts b/src/uni_modules/wot-design-uni/components/wd-notify/index.ts index bc47edda6..86bdcde96 100644 --- a/src/uni_modules/wot-design-uni/components/wd-notify/index.ts +++ b/src/uni_modules/wot-design-uni/components/wd-notify/index.ts @@ -1,4 +1,3 @@ -import type { InjectionKey } from 'vue' import { provide, reactive } from 'vue' import type { NotifyProps } from './type' import { deepMerge, isString } from '../common/util' diff --git a/src/uni_modules/wot-design-uni/components/wd-notify/wd-notify.vue b/src/uni_modules/wot-design-uni/components/wd-notify/wd-notify.vue index 7bf6fedc2..f74d47904 100644 --- a/src/uni_modules/wot-design-uni/components/wd-notify/wd-notify.vue +++ b/src/uni_modules/wot-design-uni/components/wd-notify/wd-notify.vue @@ -40,9 +40,18 @@ const state = inject(getNotifyOptionKey(props.selector), props) const customStyle = computed(() => { const { safeHeight, position } = state - - if (!isDef(safeHeight) || position !== 'top') return '' - return `top: ${addUnit(safeHeight)}` + let customStyle: string = '' + switch (position) { + case 'top': + customStyle = `top: calc(var(--window-top) + ${addUnit(safeHeight || 0)})` + break + case 'bottom': + customStyle = 'bottom: var(--window-bottom)' + break + default: + break + } + return customStyle }) const onClick = (event: MouseEvent) => { diff --git a/src/uni_modules/wot-design-uni/components/wd-picker/index.scss b/src/uni_modules/wot-design-uni/components/wd-picker/index.scss index aa2528481..15ff6fe57 100644 --- a/src/uni_modules/wot-design-uni/components/wd-picker/index.scss +++ b/src/uni_modules/wot-design-uni/components/wd-picker/index.scss @@ -162,6 +162,10 @@ line-height: 1.25; } + @include e(body) { + padding-bottom: var(--window-bottom); + } + @include e(toolbar) { position: relative; display: flex; diff --git a/src/uni_modules/wot-design-uni/components/wd-picker/wd-picker.vue b/src/uni_modules/wot-design-uni/components/wd-picker/wd-picker.vue index d49058567..719cb11a1 100644 --- a/src/uni_modules/wot-design-uni/components/wd-picker/wd-picker.vue +++ b/src/uni_modules/wot-design-uni/components/wd-picker/wd-picker.vue @@ -33,35 +33,37 @@ @close="onCancel" custom-class="wd-picker__popup" > - - - - - {{ cancelButtonText }} - - - {{ title }} - - - {{ confirmButtonText }} + + + + + + {{ cancelButtonText }} + + + {{ title }} + + + {{ confirmButtonText }} + + + - - diff --git a/src/uni_modules/wot-design-uni/components/wd-popup/type.ts b/src/uni_modules/wot-design-uni/components/wd-popup/type.ts new file mode 100644 index 000000000..229159748 --- /dev/null +++ b/src/uni_modules/wot-design-uni/components/wd-popup/type.ts @@ -0,0 +1 @@ +export type PopupType = 'center' | 'top' | 'right' | 'bottom' | 'left' diff --git a/src/uni_modules/wot-design-uni/components/wd-popup/wd-popup.vue b/src/uni_modules/wot-design-uni/components/wd-popup/wd-popup.vue index 4103742e8..e77cff004 100644 --- a/src/uni_modules/wot-design-uni/components/wd-popup/wd-popup.vue +++ b/src/uni_modules/wot-design-uni/components/wd-popup/wd-popup.vue @@ -28,11 +28,12 @@ export default {