element-plus [Component] [popover, date-picker] popover和date-picker的父子级关系问题

wvt8vs2t  于 5个月前  发布在  其他
关注(0)|答案(2)|浏览(129)

Bug Type: Component

Environment

  • Vue Version: 3.2.37
  • Element Plus Version: 2.2.22
  • Browser / OS: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
  • Build Tool: Vite

Reproduction

  • el-popover
  • el-date-picker

Element Plus Playground

Steps to reproduce

<el-popover trigger="hover" placement="bottom" :width="467">
                <template #reference>
										指针悬浮此处
                </template>
                <template #default>
                  <div class="flex items-center justify-center">
                    <span>尝试选择一个日期:</span>
                    <el-date-picker
                      v-model="newDate"
                      type="date"
                      placeholder="选择日期"
                    />
                    <el-button>确认</el-button>
                  </div>
                </template>
              </el-popover>

What is Expected?

-- 尝试在el-date-picker中选择日期时,能够锁定popover当前状态

What is actually happening?

-- 尝试在el-date-picker中选择日期时,无法锁定popover当前状态,被视为鼠标指针离开了el-popover,两者一起消失

Additional comments

(empty)

zlwx9yxi

zlwx9yxi1#

你可以手动控制 visible,考虑这个 demo

rslzwgfq

rslzwgfq2#

你可以手动控制 visible,考虑这个 demo

太强了大佬,我要为你🔓🐮子

相关问题