How x-extends/vxe-ui-plugins works
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 Antd render · plugin-render-element Element render · plugin-render-tdesign TDesign render · plugin-render-wangeditor Editor render
Components 19
Plugin Monorepo
Shared packaging and contribution layer for all independently published Vxe UI plugins.
- vxe-ui-plugins · Federated collection of independent npm plugins for the Vxe UI / vxe-table ecosystem.
- Vxe UI · 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 · Adapter for Ant Design Vue, with richer form-design, form, table, and store layers.
plugin-render-antd - Element render · Adapter for Element UI/Vue with form-design, form, table, store, and util layers.
plugin-render-element - Arco render · Adapter for Arco components with shared store and component utility helpers.
plugin-render-arco - iView render · Adapter for iView with shared store and component utility helpers.
plugin-render-iview - Naive render · Adapter for Naive UI with shared store and component utility helpers.
plugin-render-naive - TDesign render · Adapter for TDesign with form, table, store, and util layers.
plugin-render-tdesign - Editor render · Adapter for WangEditor-based form rendering.
plugin-render-wangeditor - Chart render · Chart rendering integration for Vxe UI.
plugin-render-chart - ECharts render · ECharts rendering integration for Vxe UI.
plugin-render-echarts - Form widgets · Field widgets and design-time inputs used by the richer render adapters.
- Form/Table bridge · 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 · PDF generation plugin with bundled font assets for multilingual output.
plugin-export-pdf - XLSX export · Spreadsheet export plugin for Vxe table data.
plugin-export-xlsx - PDF fonts · 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 · Context-menu and action augmentation plugin.
plugin-menu - Shortcut plugin · Keyboard shortcut handling plugin.
plugin-shortcut-key - Validator plugin · Validation rules and feedback integration plugin.
plugin-validator
Connections 36
- 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.