vue el-popover hover delay trigger, el-popover triggers after the mouse is placed for three seconds

Background: el-popover hover displays multiple el-popovers as long as the mouse is scraped, causing loading lag.

solution

Add a delay display to el-popover

<template>
  <div>
    <el-popover
      trigger="hover"
      :open-delay="3000"
      content="这是一个Popover"
    >
      <button>鼠标放上三秒触发</button>
    </el-popover>
  </div>
</template>

By setting the open-delay attribute to 3000 (ie 3 seconds), the pop-up box will be displayed 3 seconds after the mouse is placed on the button. The content attribute is used to set the content displayed in the pop-up box.

Guess you like

Origin blog.csdn.net/gjwgjw1111/article/details/132735272