wkjp-list-page: One Config Object Runs Your Vue2 Admin List Pages
Teams maintaining Vue2 admin panels can cut hours of repetitive CRUD list wiring down to a config object and a single API function. The pattern also pushes for standardized response shapes and request parameters, which is often the messiest part of list pages, though it locks you into Vue2 at a time when most new work has moved to Vue3 or other frameworks.
wkjp-list-page is a Vue2 + ElementUI component that replaces the repetitive list page boilerplate in admin systems. It takes over the API request, pagination, and loading state, so the business side only supplies a configuration object for the search bar and table columns, plus a request function. The package ships with features like collapsible search fields, dynamic column configuration with drag-to-sort, built-in export, custom slots, and parent-controlled request timing.
Two configuration concepts keep the component flexible: `search-option` describes the search form schema (field types, labels, prop names) without storing values, while `filters` holds the actual query conditions and is two-way bound to the form. An `api-adapter` handles non-standard backend response shapes, and `build-params` lets teams reshape the outgoing request payload, including pagination field names and extra route parameters.
It's been integrated into multiple internal projects, with over 9k cumulative npm downloads and a stable version at 1.0.55 under the MIT license. The component is explicitly Vue2-only and requires ElementUI to be imported first. It also includes built-in tracking events for Baidu Analytics and a `@track` event for other analytics SDKs.
Separating the search form schema (`search-option`) from the state object (`filters`) is a clean pattern that makes the component reusable without tight coupling to the form implementation.
The heavy reliance on `build-params` and `api-adapter` reflects a practical reality: backend response shapes and pagination conventions vary wildly across teams, and a generic list component needs explicit escape hatches.
Being Vue2-only with a fragile dependency on ElementUI means this component is ideal for internal legacy systems but not a candidate for new projects, which is a common fate for well-honed internal tooling.
The built-in tracking and export features show that admin list pages carry non-trivial cross-cutting concerns beyond rendering a table; folding them into the component reduces the chance of inconsistent implementations across pages.