npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vgridex/plugin-drag-selection

v0.0.1

Published

Mouse drag range selection plugin for VGridex.

Downloads

70

Readme

@vgridex/plugin-drag-selection

Drag selection adds mouse-based rectangular range selection to VGridex. Users can press, drag across cells, and release to select a range.

拖拽选择为 VGridex 提供基于鼠标的矩形范围选择能力,用户可以按下鼠标、拖过多个单元格并松开来形成选区。

Installation / 安装

pnpm add @vgridex/core @vgridex/plugin-drag-selection

Usage / 使用方式

<template>
  <VGridex ref="tableRef" :rowColumnConfig="rowColumnConfig" />
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue'
import VGridex from '@vgridex/core'
import '@vgridex/core/style.css'
import { dragSelectPlugin } from '@vgridex/plugin-drag-selection'

const tableRef = ref<InstanceType<typeof VGridex> | null>(null)

onMounted(() => {
  tableRef.value?.use(dragSelectPlugin)
})
</script>

Interaction / 交互说明

  • Drag from one cell to another to select the rectangular area between them.
  • 从一个单元格拖拽到另一个单元格,会选中两者之间的矩形区域。
  • Press Cmd on macOS or Ctrl on Windows/Linux while dragging to add the dragged range to the current selection.
  • 拖拽时按住 macOS 的 Cmd 或 Windows/Linux 的 Ctrl,可以把拖拽区域追加到当前选区。
  • A plain click inside the same cell is left to @vgridex/plugin-click-selection.
  • 同一个单元格内的普通点击会交给 @vgridex/plugin-click-selection 处理。
  • Drag updates are throttled with requestAnimationFrame.
  • 拖拽过程中的选区更新使用 requestAnimationFrame 节流。

Examples / 交互示例

Basic drag selection / 基础拖拽选择:

Initial selection: none
初始选区:无

Drag from 0-0 to 2-1
从 0-0 拖拽到 2-1
=> selected: [0-0, 0-1, 1-0, 1-1, 2-0, 2-1]
=> 当前选区:[0-0, 0-1, 1-0, 1-1, 2-0, 2-1]

Add a dragged range / 追加拖拽区域:

Initial selection: [4-4]
初始选区:[4-4]

Cmd/Ctrl + drag from 0-0 to 1-1
Cmd/Ctrl + 从 0-0 拖拽到 1-1
=> selected: [4-4, 0-0, 0-1, 1-0, 1-1]
=> 当前选区:[4-4, 0-0, 0-1, 1-0, 1-1]

Common Combinations / 常见搭配

  • Use with @vgridex/plugin-click-selection so plain clicks and drag ranges both work naturally.
  • 搭配 @vgridex/plugin-click-selection 可以同时支持普通点击和拖拽范围选择。
  • Use with @vgridex/plugin-copy-paste to copy or paste rectangular ranges.
  • 搭配 @vgridex/plugin-copy-paste 可以对矩形选区进行复制粘贴。
  • Use @vgridex/preset-basic-plugins for the official default combination.
  • 如果希望使用官方默认组合,可以直接使用 @vgridex/preset-basic-plugins

Notes / 注意事项

This plugin only updates the selection. It does not modify cell data.

该插件只更新选区,不会修改单元格数据。

Links / 链接

  • Repository / 仓库:https://github.com/DraxWu/web-excel-table
  • Issues / 问题反馈:https://github.com/DraxWu/web-excel-table/issues