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

@agile-team/mach-table-vue

v0.28.0

Published

Official Vue 3 adapter for the MachTable enterprise data grid

Downloads

2,379

Readme

@agile-team/mach-table-vue

MachTable 0.28 的官方 Vue 3 适配包。一个依赖即可获得 Core、泛型 <MachTable>、原生 slots、应用/路由配置、按需工作流、异步组件边界和自动生命周期清理。

pnpm add @agile-team/mach-table-vue

应用入口只引入一次样式:

import "@agile-team/mach-table-vue/styles.css";

局部接入

<script setup lang="ts">
import { ref } from "vue";
import { MachTable, useMachTable, type ColDef } from "@agile-team/mach-table-vue";

interface Row { id: string; name: string }
const table = useMachTable<Row>();
const rows = ref<Row[]>([{ id: "1", name: "MachTable" }]);
const columns: ColDef<Row>[] = [{ field: "name", flex: 1, editable: true }];
</script>

<template>
  <div style="height: 520px">
    <MachTable
      :ref="table.ref"
      :row-data="rows"
      :column-defs="columns"
      row-key="id"
      enable-column-resize
      :persistence="{ key: 'customers:list', sections: ['columns'] }"
    />
  </div>
</template>

全局接入

表格页面较多时,全局注册一次,页面模板直接使用 <MachTable>

import { createApp } from "vue";
import { MachTablePlugin } from "@agile-team/mach-table-vue";
import machTableConfig from "@/config/mach-table.config";

createApp(App).use(MachTablePlugin, machTableConfig).mount("#app");

需要减少首屏代码时改用异步全局插件:

import AsyncMachTablePlugin, { preloadMachTable } from "@agile-team/mach-table-vue/async";

app.use(AsyncMachTablePlugin, machTableConfig);
void preloadMachTable(); // 可选:路由 hover 时预取

推荐把约定集中到独立文件:

// src/config/mach-table.config.ts
import { defineMachTableConfig, defineMachTablePreset } from "@agile-team/mach-table-vue";

export default defineMachTableConfig({
  defaults: {
    size: "compact",
    columnLayout: "fit",
    enableColumnResize: true,
    defaultColDef: { sortable: true, filter: true, resizable: true }
  },
  defaultPreset: "list",
  presets: {
    list: defineMachTablePreset({ stripedRows: true }),
    crud: defineMachTablePreset({ rowSelection: "multiple", editType: "fullRow" })
  }
});

布局或路由可用响应式 provideMachTableConfig() 叠加配置,表格 props 始终拥有最高优先级。

按需子入口

import { useMachTableQuery, useMachTableEditing } from "@agile-team/mach-table-vue/workflows";
import { MachTableToolbar } from "@agile-team/mach-table-vue/ui";
import { vueCellRenderer } from "@agile-team/mach-table-vue/adapters";
import { createElementPlusEditors } from "@agile-team/mach-table-vue/editors";
import { createWorkerDataProcessor } from "@agile-team/mach-table-vue/worker";
  • /workflows:请求取消、防过期覆盖、服务端分页、跨页选择、脏数据和冲突保存;reset() 清空全部表格过滤且只请求一次。
  • /ui:可选标准工具栏;需要全局组件时另行 app.use(MachTableUiPlugin),其全局组件类型也只在导入该子入口后生效。
  • /adapters:自定义 Vue renderer/editor/detail/overlay 桥接。
  • /editors:可选 Element Plus 编辑器,Element Plus 由宿主注入。
  • /worker:大型本地过滤/排序的独立 Worker 能力。

该包自动依赖 @agile-team/mach-table 并重导出 Core 类型;宿主只需提供 vue >= 3.2

文档:Vue 指南 · 企业接入 · 配置中心

Source-available © ChenyCHENYU (Agile Team). 任何使用均须事先取得书面授权。详见 LICENSE授权流程