# x-extends/vxe-ui-plugins architecture

> Architecture diagram of the GitHub repository x-extends/vxe-ui-plugins, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/x-extends/vxe-ui-plugins
- Repository: https://github.com/x-extends/vxe-ui-plugins

## Overview

This repository is a multi-package plugin collection for Vxe UI / vxe-table v4.x. It is not a single application; it is a set of independently published npm packages that extend the core Vxe UI ecosystem with rendering adapters, export utilities, and interaction helpers.

#### Overall architecture

The repo is organized as a plugin monorepo with one package per capability. Each package is self-contained and typically includes:

- `src/index.ts` as the public entry point
- `types/index.d.ts` for TypeScript declarations
- `style.scss` for package-specific styles
- `gulpfile.js` and `tsconfig.json` for building and packaging
- package-local metadata and license files

At the root, the repository mainly provides project-wide metadata and contribution templates. The architecture is therefore “federated”: there is no single central runtime, only a family of plugins sharing conventions and dependency patterns.

#### Main subsystem groups

##### 1) Render adapter plugins
These are the largest part of the repo and adapt Vxe UI concepts to different component libraries or rendering targets.

Packages in this group include:

- `plugin-render-antd`
- `plugin-render-element`
- `plugin-render-arco`
- `plugin-render-iview`
- `plugin-render-naive`
- `plugin-render-tdesign`
- `plugin-render-wangeditor`
- `plugin-render-chart`
- `plugin-render-echarts`

These packages are architecture siblings: each one maps the same general Vxe UI rendering contracts to a different UI ecosystem.

###### Internal structure of the richer render adapters
Some render packages have a more structured internal layout:

- `src/form-design/`
  - widget definitions such as checkbox, date picker, input, number input, radio, select, switch, textarea
  - a shared `use.ts` helper
  - `index.ts` for form-design-specific exports
- `src/form/`
  - form rendering integration
- `src/table/`
  - table rendering integration
- `src/store/`
  - shared state or registration logic for the plugin
- `src/util/comp.ts`
  - component utility helpers
- `src/index.ts`
  - top-level plugin registration/export

This indicates a layered design:
schema/widget definitions -> form/table render integration -> plugin registration/export.

Packages that only have `src/index.ts` and maybe `store`/`util` are thinner adapters or focused integrations.

##### 2) Export plugins
These packages provide document export capabilities:

- `plugin-export-pdf`
- `plugin-export-xlsx`

These are separate from render plugins because they transform table/form data into exportable files rather than UI components.

`plugin-export-pdf` is notable for including a `fonts/` directory with bundled Source Han Sans font files, which strongly suggests PDF generation is done in-browser or in a build artifact that needs embedded fonts for correct rendering across locales.

The export plugins likely sit at the boundary between Vxe table data structures and file-generation libraries.

##### 3) Interaction/behavior plugins
These packages add non-visual behavior to the Vxe UI environment:

- `plugin-menu`
- `plugin-shortcut-key`
- `plugin-validator`

These are smaller, behavior-focused packages. They likely hook into Vxe UI’s event model or component lifecycle to provide:
- contextual menus
- keyboard shortcut handling
- validation rules/integration

They follow the same package conventions, but the internal subsystem is simpler than the render adapters.

#### Data flow and integration boundaries

##### Core dependency boundary
The repository is built around the Vxe UI ecosystem:
- Vxe table is the core dependency mentioned in the README
- the plugins extend Vxe UI rather than replacing it
- consumer applications decide which plugin packages to install and register

This means the primary boundary is between:
1. Vxe UI / vxe-table data and lifecycle APIs
2. plugin-specific adapter logic
3. the target external library or output format

##### Render plugins: schema to component mapping
For render adapters, the data flow is generally:

- Vxe UI emits render requests or form/table schema information
- plugin code selects the correct adapter/widget
- adapter translates Vxe-centric configuration into the target library’s component props and events
- the target UI library renders the actual control in the host app

For the richer form-design packages, the internal flow is:
- form design widget definitions define how individual field types behave
- shared store/utilities coordinate registration and component lookup
- form/table modules expose the integration points to the host application

##### Export plugins: structured data to files
For export packages, the flow is:

- table/form data is received from the Vxe UI context
- plugin code formats or serializes it
- output is generated as PDF or XLSX
- the resulting file artifact is delivered to the consumer app for download or further handling

`plugin-export-pdf` has an extra asset boundary because font files are bundled as runtime resources.

##### Behavior plugins: events to enhanced UX
For menu, shortcut, and validation plugins:
- the host application or Vxe UI emits user interaction events
- plugin logic intercepts or augments those events
- the plugin adds menu actions, keyboard handling, or validation feedback

These packages are mostly “cross-cutting” concerns rather than data transformers.

#### Shared structural conventions

Across nearly all packages, the architecture is consistent:

- TypeScript source
- SCSS for styling
- type declaration output
- package-local build config
- isolated package boundaries

This consistency matters for the diagram because it shows the repo is designed for repeatable packaging and independent consumption, not for a single bundled runtime.

#### Technology and tooling that affect architecture

These are materially relevant:

- TypeScript: the primary implementation language across packages
- SCSS: package-scoped styling is part of each plugin’s deliverable
- Gulp: build orchestration and packaging at the package level
- npm packaging: each plugin is published separately
- vxe-table v4.x compatibility: the core integration target
- external UI libraries: Ant Design Vue, Element, Arco, iView, Naive UI, TDesign, WangEditor, and charting/export tooling as applicable

#### How to think about the repo in a diagram

A useful diagram would show:

1. A central Vxe UI / vxe-table host boundary
2. Multiple plugin packages attached to it as independent extensions
3. Three major plugin categories:
   - render adapters
   - export utilities
   - behavior helpers
4. For render plugins, a deeper internal split into widgets, form/table integration, store/state, and utilities
5. For export plugins, a path from table/form data to generated file output, with font assets in the PDF package
6. For behavior plugins, event-driven augmentation of user interaction

#### Key architectural takeaway

This repo is an extensible plugin suite, not a monolith. Its architecture is defined by:
- package isolation
- shared Vxe UI compatibility
- adapter-based rendering to multiple third-party UI frameworks
- separate export and behavior concerns
- consistent build/type/style conventions across all packages

Main entry points: [`plugin-render-antd`](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-antd) (Antd render), [`plugin-render-element`](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-element) (Element render), [`plugin-render-tdesign`](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-tdesign) (TDesign render), [`plugin-render-wangeditor`](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-wangeditor) (Editor render)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph "Plugin Monorepo"
  repo["vxe-ui-plugins<br/>monorepo"]
  core(("Vxe UI<br/>host API"))
end

subgraph "Render Adapters"
  antd["Antd render<br/>render adapter"]
  element["Element render<br/>render adapter"]
  arco["Arco render<br/>render adapter"]
  iview["iView render<br/>render adapter"]
  naive["Naive render<br/>render adapter"]
  tdesign["TDesign render<br/>render adapter"]
  wangeditor["Editor render<br/>render adapter"]
  chart["Chart render<br/>render adapter"]
  echarts["ECharts render<br/>render adapter"]
  widgets["Form widgets<br/>widget set"]
  integration["Form/Table bridge<br/>integration layer"]
end

subgraph "Export Utilities"
  pdf["PDF export<br/>file export"]
  xlsx["XLSX export<br/>file export"]
  assets["PDF fonts<br/>asset bundle"]
end

subgraph "Behavior Plugins"
  menu["Menu plugin<br/>interaction"]
  shortcuts["Shortcut plugin<br/>interaction"]
  validator["Validator plugin<br/>validation"]
end

repo -->|"extends"| core
repo -->|"contains"| antd
repo -->|"contains"| element
repo -->|"contains"| arco
repo -->|"contains"| iview
repo -->|"contains"| naive
repo -->|"contains"| tdesign
repo -->|"contains"| wangeditor
repo -->|"contains"| chart
repo -->|"contains"| echarts
repo -->|"contains"| pdf
repo -->|"contains"| xlsx
repo -->|"contains"| menu
repo -->|"contains"| shortcuts
repo -->|"contains"| validator
antd -->|"uses"| widgets
element -->|"uses"| widgets
antd -->|"organizes"| integration
element -->|"organizes"| integration
tdesign -->|"organizes"| integration
wangeditor -->|"specializes"| integration
pdf -->|"bundles"| assets
antd -.->|"registers with"| core
element -.->|"registers with"| core
arco -.->|"registers with"| core
iview -.->|"registers with"| core
naive -.->|"registers with"| core
tdesign -.->|"registers with"| core
wangeditor -.->|"registers with"| core
chart -.->|"registers with"| core
echarts -.->|"registers with"| core
pdf -.->|"consumes"| core
xlsx -.->|"consumes"| core
menu -.->|"hooks into"| core
shortcuts -.->|"hooks into"| core
validator -.->|"hooks into"| core

click antd "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-render-antd"
click element "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-render-element"
click arco "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-render-arco"
click iview "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-render-iview"
click naive "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-render-naive"
click tdesign "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-render-tdesign"
click wangeditor "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-render-wangeditor"
click chart "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-render-chart"
click echarts "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-render-echarts"
click pdf "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-export-pdf"
click xlsx "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-export-xlsx"
click menu "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-menu"
click shortcuts "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-shortcut-key"
click validator "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-validator"
click assets "https://github.com/x-extends/vxe-ui-plugins/tree/main/plugin-export-pdf/fonts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class repo,core toneBlue
class antd,element,arco,iview,naive,tdesign,wangeditor,chart,echarts,widgets,integration toneAmber
class pdf,xlsx,assets toneMint
class menu,shortcuts,validator toneRose
```

## Components

### Plugin Monorepo

Shared packaging and contribution layer for all independently published Vxe UI plugins.

- **vxe-ui-plugins**: monorepo · Federated collection of independent npm plugins for the Vxe UI / vxe-table ecosystem.
- **Vxe UI**: host API · The compatibility boundary each plugin extends.

### Render Adapters

Plugins that map Vxe UI rendering contracts to external component libraries and chart/editor targets.

- [Antd render](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-antd): render adapter · Adapter for Ant Design Vue, with richer form-design, form, table, and store layers. · `plugin-render-antd`
- [Element render](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-element): render adapter · Adapter for Element UI/Vue with form-design, form, table, store, and util layers. · `plugin-render-element`
- [Arco render](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-arco): render adapter · Adapter for Arco components with shared store and component utility helpers. · `plugin-render-arco`
- [iView render](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-iview): render adapter · Adapter for iView with shared store and component utility helpers. · `plugin-render-iview`
- [Naive render](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-naive): render adapter · Adapter for Naive UI with shared store and component utility helpers. · `plugin-render-naive`
- [TDesign render](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-tdesign): render adapter · Adapter for TDesign with form, table, store, and util layers. · `plugin-render-tdesign`
- [Editor render](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-wangeditor): render adapter · Adapter for WangEditor-based form rendering. · `plugin-render-wangeditor`
- [Chart render](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-chart): render adapter · Chart rendering integration for Vxe UI. · `plugin-render-chart`
- [ECharts render](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-render-echarts): render adapter · ECharts rendering integration for Vxe UI. · `plugin-render-echarts`
- **Form widgets**: widget set · Field widgets and design-time inputs used by the richer render adapters.
- **Form/Table bridge**: integration layer · Form and table render integration, plus shared registration and utility helpers.

### Export Utilities

Plugins that turn Vxe table data into downloadable file formats.

- [PDF export](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-export-pdf): file export · PDF generation plugin with bundled font assets for multilingual output. · `plugin-export-pdf`
- [XLSX export](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-export-xlsx): file export · Spreadsheet export plugin for Vxe table data. · `plugin-export-xlsx`
- [PDF fonts](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-export-pdf/fonts): asset bundle · Bundled Source Han Sans font resources used by PDF export. · `plugin-export-pdf/fonts`

### Behavior Plugins

Plugins that add cross-cutting interaction and validation behavior.

- [Menu plugin](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-menu): interaction · Context-menu and action augmentation plugin. · `plugin-menu`
- [Shortcut plugin](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-shortcut-key): interaction · Keyboard shortcut handling plugin. · `plugin-shortcut-key`
- [Validator plugin](https://github.com/x-extends/vxe-ui-plugins/tree/HEAD/plugin-validator): validation · Validation rules and feedback integration plugin. · `plugin-validator`

## Connections

- vxe-ui-plugins → Vxe UI: extends · Plugins target the Vxe UI / vxe-table compatibility boundary.
- vxe-ui-plugins → Antd render: contains · Independent published package.
- vxe-ui-plugins → Element render: contains · Independent published package.
- vxe-ui-plugins → Arco render: contains · Independent published package.
- vxe-ui-plugins → iView render: contains · Independent published package.
- vxe-ui-plugins → Naive render: contains · Independent published package.
- vxe-ui-plugins → TDesign render: contains · Independent published package.
- vxe-ui-plugins → Editor render: contains · Independent published package.
- vxe-ui-plugins → Chart render: contains · Independent published package.
- vxe-ui-plugins → ECharts render: contains · Independent published package.
- vxe-ui-plugins → PDF export: contains · Independent published package.
- vxe-ui-plugins → XLSX export: contains · Independent published package.
- vxe-ui-plugins → Menu plugin: contains · Independent published package.
- vxe-ui-plugins → Shortcut plugin: contains · Independent published package.
- vxe-ui-plugins → Validator plugin: contains · Independent published package.
- Antd render → Form widgets: uses · Design-time field widgets live under form-design.
- Element render → Form widgets: uses · Design-time field widgets live under form-design.
- Antd render → Form/Table bridge: organizes · Form, table, store, and util layers coordinate the adapter.
- Element render → Form/Table bridge: organizes · Form, table, store, and util layers coordinate the adapter.
- TDesign render → Form/Table bridge: organizes · Form, table, store, and util layers coordinate the adapter.
- Editor render → Form/Table bridge: specializes · Editor-focused form integration.
- PDF export → PDF fonts: bundles · Embedded font files support PDF rendering.
- Antd render → Vxe UI: registers with · Adapter plugs into the host Vxe UI runtime.
- Element render → Vxe UI: registers with · Adapter plugs into the host Vxe UI runtime.
- Arco render → Vxe UI: registers with · Adapter plugs into the host Vxe UI runtime.
- iView render → Vxe UI: registers with · Adapter plugs into the host Vxe UI runtime.
- Naive render → Vxe UI: registers with · Adapter plugs into the host Vxe UI runtime.
- TDesign render → Vxe UI: registers with · Adapter plugs into the host Vxe UI runtime.
- Editor render → Vxe UI: registers with · Adapter plugs into the host Vxe UI runtime.
- Chart render → Vxe UI: registers with · Adapter plugs into the host Vxe UI runtime.
- ECharts render → Vxe UI: registers with · Adapter plugs into the host Vxe UI runtime.
- PDF export → Vxe UI: consumes · Export plugin consumes table/form data from Vxe UI.
- XLSX export → Vxe UI: consumes · Export plugin consumes table/form data from Vxe UI.
- Menu plugin → Vxe UI: hooks into · Behavior plugin augments host events and lifecycle.
- Shortcut plugin → Vxe UI: hooks into · Behavior plugin augments host events and lifecycle.
- Validator plugin → Vxe UI: hooks into · Behavior plugin augments host events and lifecycle.
