@formio/vue

中文文档
6.3.6发布于 2026/11/14MITTypeScriptESM + CJS近 30 天下载 5853

A vue.js renderer for form.io forms.

原始使用文档
文档目录14 节
  1. Official Documentation
  2. Install
  3. npm
  4. Basic Usage
  5. Props
  6. src : string
  7. url : string
  8. form : object
  9. submission : Object
  10. options : object
  11. Events
  12. FormBuilder
  13. Form Actions
  14. License

@formio/vue

A Vue.js component for rendering out forms based on the Form.io platform.

Official Documentation

For the latest documentation, release information, and guides, always refer to the official Form.io Help Documentation available here:

https://help.form.io

Install

npm

Vue Formio can be used on the server, or bundled for the client using an npm-compatible packaging system such as Browserify or webpack.

npm install @formio/vue --save

Basic Usage

HTML inside of Vue template file:

<template>
  <div id="app">
    <formio src="" url="" form="" submission="" options="" v-on:submit=""></formio>
  </div>
</template>

Javascript inside of Vue template file.

<script>
  import { Form } from '@formio/vue';
  export default {
      name: 'app',
      components: { formio: Form },
  }
</script>

Props

src : string

The form API source from form.io or your custom formio server.

See the Creating a form for where to set the API Path for your form.

You can also pass in the submission url as the src and the form will render with the data populated from the submission.

url : string

If you pass in the form and submission directly, some components such as resources, files and forms need to know the url of the form on the server. Pass it in with the url option.

form : object

An object representing the form. Use this instead of src for custom forms.

Note: src will override this property if used.

submission: Object

An object representing the default data for the form.

Note: src will override this if a submission url is entered.

options: object

An object with the formio.js options that is passed through. See Form.io Options.

Events

All events triggered from the form are available via the v-on property. See Form.io Events for all the available events.

Then on the form set <formio src="myform" v-on:submit="doSomething" />

FormBuilder

HTML inside of Vue template file:

<template>
  <div id="app">
    <formbuilder v-bind:form="{display: 'form'}" v-bind:options="{}" v-on:change="(schema) => console.log(schema)"></formbuilder>
  </div>
</template>

Javascript inside of Vue template file.

<script>
  import { FormBuilder } from '@formio/vue';
  export default {
      name: 'app',
      components: { FormBuilder },
  }
</script>

Form Actions

Get access to the form instance

<template>
  <div id="app">
    <formio ref="formioForm"></formio>
  </div>
</template>

Run a method

this.$refs.formioForm.formio.submit()

All methods are available here https://help.form.io/developers/form-renderer#form-methods

License

Released under the MIT License. touch

版本与发布记录

@formio/vue 共发布 30 个版本,首次发布于 2022/03/02;过去 12 个月发布了 23 个版本。

版本发布日期距今
6.3.6latest2026/11/142 天前
6.3.52026/10/101 个月前
6.3.42026/09/231 个月前
6.3.32026/09/171 个月前
6.3.22026/08/272 个月前
6.3.1-pdf515.02026/08/113 个月前

其他发布通道:rc → 6.0.0-rc.1。

关于 @formio/vue 的常见问题

@formio/vue 是什么?

A vue.js renderer for form.io forms.

如何安装 @formio/vue?

在项目目录运行 npm install @formio/vue,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(^3.4.15)、@formio/js(^5.7.1)、@formio/core(^2.9.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@formio/vue 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@formio/vue 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@formio/vue 可以商用吗?

@formio/vue 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@formio/vue 的下载量有多少?

根据 npm 官方下载统计,@formio/vue 在 2026/10/16 – 2026/11/14 这 30 天内被下载 5,853 次,日均约 195 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@formio/vue 还在维护吗?

最新版本 6.3.6 发布于 2026/11/14(2 天前);至今共发布 30 个版本,其中过去 12 个月发布了 23 个;首次发布于 2022/03/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。