Content-Length: 270939 | pFad | http://github.com/x-extends/vxe-table/issues/3176

C4 能否冒泡事件current-hover事件,方便应用捕获当前聚焦的数据行 · Issue #3176 · x-extends/vxe-table · GitHub
Skip to content

能否冒泡事件current-hover事件,方便应用捕获当前聚焦的数据行 #3176

@XiayidanAlimu

Description

@XiayidanAlimu

这个需求解决了什么问题:

目前操作列应用了自定义单元格插槽渲染,导致渲染性能显著下降,找到的折衷策略是仅在聚焦当前数据行时,再显示操作列,避免一次性渲染全部数据导致的性能消耗,因此希望vxe-table能公开current-hover事件,方便应用层捕获当前数据聚焦的数据行的详细信息。

建议的 API 是什么样的:

<template>
    <vxe-table
      border
      ref="vxeTableRef"
      show-overflow
      show-header-overflow
      show-footer-overflow
      height="900"
      :row-config="{ isHover: true, isCurrent: true }"
      :column-config="{ resizable: true }"
      :virtual-y-config="{ enabled: true, gt: 0 }"
      @current-hover-change="handleCurrentHoverChange"
    >
    </vxe-table>
  </div>
</template>

<script setup>

const handleCurrentHoverChange= ({ newValue, oldValue, row, $event }) => {
  console.log(newValue);
  activeRowIndex.value = newValue.id;
};

</script>

是否已有其他不错的替代方案:

没有

是否使用当前最新版本?

  • 我已确认是使用当前的最新版本。

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/x-extends/vxe-table/issues/3176

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy