Schema-Driven Virtual Tables: Bringing Element Plus TableV2 Under a Single Config
This schema-first approach removes the boilerplate of manually composing Element Plus TableV2 options, letting developers and AI generate complex data tables from a single configuration object. It also shows how to wrap third-party UI components into a declarative form engine, a pattern that could generalize to other component libraries.
JuanForm, a Vue 3 form engine, treats a virtual table as just another schema field. Developers declare columns with the same prop, label, and type pattern used for form controls, then layer on capabilities like grouped headers, hidden columns, custom editors, mode toggles, text formatting, variable row heights, tree expansion, and inline row additions. All of it lives in a config object, so neither the developer nor an AI helper needs to touch the underlying Element Plus TableV2 API.
The article walks through a beneficiary list with 5,000 rows. It shows how to define nested column groups, hide columns conditionally, split a name column into two inputs with a custom editor, add operation buttons that open dialogs, switch between control and text modes, format phone numbers with a country code prefix, and render HTML description cells with estimated row heights. Tree data comes from a children array with an expand key, and a computed expression shows a row's depth. Adding rows works on both top level and nested levels. The engine also supports extending built-in components through createInput, used here to build a custom recognition dialog that parses pasted text into row fields. The whole pattern aims to make complex admin pages describable, so developers or AI can generate them from configuration.
By turning a virtual table into a schema field, JuanForm lets developers reuse one configuration vocabulary across forms and complex data views, which cuts down context switching.
The pattern of extending built-in components via createInput points toward a meta-framework where UI features are composed through configuration and small JavaScript hooks, a fit for low-code and AI-assisted development.
The article demonstrates practical accommodations: when a grouped header loses all but one child, the group is flattened, showing that the schema engine actively reshapes the UI based on data, not just renders a static map.