# form-morph **Repository Path**: fishbelly/form-morph ## Basic Information - **Project Name**: form-morph - **Description**: 动态表单 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2026-11-13 - **Last Updated**: 2026-12-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # form-morph UI-framework-agnostic dynamic form engine for Vue 3. - `@fishbelly/form-morph` — engine, runtime shell, designer and plugin SDK. No UI kit dependency. - `@fishbelly/form-morph-arco` — official Arco Design field pack. - `@fishbelly/form-morph-element-plus` — official Element Plus field pack. - `@fishbelly/form-morph-antdv` — official Ant Design Vue field pack. The main package owns schema, state, validation, behavior rules, data sources, lifecycle and the renderer shell. Concrete controls are plugins. ## Capabilities - Schema v3 with grid layout, nested containers, conditional required fields and schema migrations. - Read-only formula fields with a safe expression language, element-wise arithmetic and aggregates over subform arrays, plus row-local calculations. - Declarative behavior rules (conditions + target operations + effects) with custom effects, operators and validators, including cross-scope targets into subform rows. - Cross-field compare rules, rule-level conditions, and debounced/abortable remote validation with designer support. - Server error merging with error summary and focus-first-error support. - Static / HTTP / plugin data sources with `{{field}}` interpolation, cascading reloads, cancellation and an optional `request` adapter. - i18n message layers, host overrides, external translators and validation message providers. - Schema content translations for labels, help text, placeholders, static text, option labels and validation messages, with a designer translation tab. - Value adapters for submit/restore, upload contracts and asset URL resolution. - `edit` / `view` / `print` form modes, plus the internal `design` mode used by the designer canvas. - Visual designer with drag-and-drop, outline, multi-select bulk editing, undo/redo, lint and built-in API docs. - Tabs, collapse and steps navigation containers with pane-level visibility, lazy mounting, error badges, submit-time error reveal and step-scoped validation. - Object-array subforms with row-scoped values, validation, behaviors and data sources. ## Quick start ```bash yarn add @fishbelly/form-morph @fishbelly/form-morph-arco ``` ```ts import { createApp } from 'vue'; import { createFormMorph } from '@fishbelly/form-morph'; import { createArcoPack } from '@fishbelly/form-morph-arco'; import '@fishbelly/form-morph/style.css'; import '@fishbelly/form-morph-arco/style.css'; import App from './App.vue'; const morph = createFormMorph({ plugins: [createArcoPack()] }); createApp(App).use(morph).mount('#app'); ``` ```vue ``` Designer: ```vue ``` ## Documentation - [API 文档](docs/API.md) — Schema 协议、渲染器、设计器、校验、行为联动、数据源与插件开发。 - 设计器工具栏内置「API 文档」,可直接查阅使用说明与当前注册组件 API。 ## Workspace ```bash yarn install yarn dev # playground yarn typecheck yarn test yarn build ```