Skip to content

Commit eddbd5d

Browse files
fix: 🐛 修复 DropMenu 设置 Modal 无效的问题 (#1125)
✅ Closes: #1121
1 parent ff99b22 commit eddbd5d

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎src/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ const showWrapper = ref<boolean>(false)
7878
const showPop = ref<boolean>(false)
7979
const position = ref<PopupType>()
8080
const zIndex = ref<number>(12)
81-
const modal = ref<boolean>(true)
8281
const duration = ref<number>(0)
8382
8483
const { parent: dropMenu } = useParent(DROP_MENU_KEY)
@@ -186,7 +185,6 @@ function handleOpen() {
186185
showWrapper.value = true
187186
showPop.value = true
188187
if (dropMenu) {
189-
modal.value = Boolean(dropMenu.props.modal)
190188
duration.value = Number(dropMenu.props.duration)
191189
position.value = dropMenu.props.direction === 'down' ? 'top' : 'bottom'
192190
}

‎src/uni_modules/wot-design-uni/components/wd-drop-menu/wd-drop-menu.vue‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<template>
22
<view :style="customStyle" :class="`wd-drop-menu ${customClass}`" @click.stop.prevent="noop" :id="dropMenuId">
3-
<wd-overlay :show="overlayVisible" :duration="duration" :z-index="12" :custom-style="modalStyle" @click="handleClickOverlay" @touchmove="noop" />
3+
<wd-overlay
4+
:show="overlayVisible"
5+
:duration="duration"
6+
:z-index="12"
7+
:custom-style="modalStyle"
8+
@click="handleClickOverlay"
9+
@touchmove="noop"
10+
v-if="modal"
11+
/>
412

513
<!-- #ifdef MP-DINGTALK -->
614
<view :id="dropMenuId">

0 commit comments

Comments
 (0)