Lanhu Code to Vue 2 Element UI Converter
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md and install @user_cbcaadba/lanhu-code-2-el-vue.
About this skill
Problem It Solves
Static pages exported from design tools or hand-built with HTML often contain repeated markup, fake form controls made from div + text + icon, and missing component state. Converting them by hand in Vue 2 + Element UI can create duplicated styles, missing methods, inconsistent class names, and controls that look component-like but do not behave like real components.
How the Skill Works
- Source boundary: it reads only
src/views/${folderName}/index.vue, the CSS files thatindex.vuereferences, and resource paths; it does not use otherCustom.vuefiles, router configs, shared components, orpackage.jsonas the page source. Router files are used only after generation to register or validate the page path. - Structure and pseudo-control analysis: it detects layout, repeated sections, buttons, inputs, radio/checkbox groups, dropdowns, pagination, dialogs, ratings, and color pickers, then maps pseudo-controls to Element UI components such as
el-input,el-select,el-checkbox,el-radio-group,el-pagination, andel-dialog. - Direct output: it writes
Custom.vuedirectly, completestemplate,data(), andmethods, applies::v-deepoverrides to preserve visual fidelity, and follows a class naming rule such as[folderName]_feature_content_state. - Limits: it is intended for static-to-dynamic refactoring on Vue 2 + Element UI, not for building pages from scratch, other stacks, or missing source files/styles.
Use Cases
- Refactor a legacy static page into a Vue 2 + Element UI dynamic page under the conversion rules.
- Restore a design by replacing buttons, search inputs, dropdowns, and pagination with Element UI components.
- Generate Custom.vue from the current folder's index.vue and CSS, then complete data and methods.
Best For
- Front-end maintainers of Vue 2 projects who need static pages refactored into Element UI components.
- Engineers taking over legacy pages and needing consistent data, methods, and scoped styles.
- Front-end developers doing pixel-faithful restoration with standardized inputs, selects, dialogs, and pagination.
- Maintainers of multi-folder views who want Custom.vue generated only from the current index.vue and CSS.
Related Skills
Automatically indexes Gradle-cached AAR/JAR dependency classes and returns library coordinates, versions, and public APIs by fully qualified name, using only the Python standard library.
Codifies AMT and YourMT3 training conventions, script patterns, hyperparameters, precision, checkpoints, and NaN safeguards.
Retrieve relevant chunks from a customer-managed PKM dataset by dataset_id and return concise, source-annotated answers.
Convert PRDs, user stories, or functional specs into prioritized test-point checklists covering functional, business-rule, boundary, exception, and non-functional dimensions.