Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

dq-form-design-for-division

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dq-form-design-for-division

`npm run lib 或者 yarn lib`

latest
npmnpm
Version
1.2.22
Version published
Weekly downloads
3
-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

打包

npm run lib 或者 yarn lib

推送npm库

npm publish

简介

本项目是一款基于 Avue 的表单设计器,拖拽式操作让你快速构建一个表单。

element-ui 2.13.2+

$ npm i element-ui

@smallwei/avue 2.6.16+

$ npm i @smallwei/avue

或自行引入cdn

安装

组件

$ npm i form-design-for-division
或
$ yarn add form-design-for-division
$ yarn
$ yarn serve

html

详见examples

使用

import AvueFormDesign from 'form-design-for-division'

Vue.use(AvueFormDesign)
<avue-form-design style="height: 86vh;"
                  :options="options"
                  storage
                  @submit="handleSubmit"></avue-form-design>

属性

参数说明类型默认值
options字段配置Object/String{ column: [] }
storage开启本地存储功能,防止浏览器刷新丢失jsonBooleanfalse
asideLeftWidth左工具栏宽度String/Number'270px'
asideRightWidth右工具栏宽度String/Number'380px'
showAvueDoc(已废弃,请使用toolbar)是否显示Avue文档Booleanfalse
showGithubStar是否显示GitHub StarBooleantrue
toolbar顶部工具栏Array['avue-doc', 'import', 'generate', 'preview', 'clear']
undoRedo是否开启撤销重做功能Booleantrue
includeFields左侧展示字段ArrayfieldsConfig.js中配置的字段
customFields自定义组件Array使用方法

options字段配置

Avue文档

属性说明类型可选值默认值
columnAvue字段Array-[]
labelPosition字段位置String'left'/'center'/'right'-
labelWidth字段宽度Number--
gutter字段间隔Number-0
menuBtn表单按钮Booleantrue/falsetrue
submitBtn显示提交按钮Booleantrue/falsetrue
submitText提交按钮文本String-'提交'
emptyBtn显示清空按钮Booleantrue/falsetrue
emptyText清空按钮文本String-'清空'
tabs多分组转标签Booleantrue/falsefalse
detail详情模式Booleantrue/falsefalse
readonly全局只读Booleantrue/falsefalse
disabled全局禁用Booleantrue/falsefalse

事件

名称说明回调参数
submit生成json回调当前配置的json

方法

名称说明参数返回
getData获取当前编辑器的JSONtype: 'string'/'json'Promise

插槽

名称说明
toolbar顶部工具栏右侧插槽
toolbar-left顶部工具栏左侧插槽

Avue插件

富文本

import AvueUeditor from 'avue-plugin-ueditor'

Vue.use(AvueUeditor)

打包

组件

$ yarn lib

源码

$ yarn build

License

MIT

Keywords

vue

FAQs

Package last updated on 22 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts