1 Star 0 Fork 0

hedden / anyware-form-design

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

简介

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

依赖

element-ui 2.12.0+

$ npm i element-ui

@smallwei/avue 2.2.0+

$ npm i @smallwei/avue

或自行引入cdn

安装

组件

$ npm i avue-form-design

$ yarn add avue-form-design

源码

github

$ yarn
$ yarn serve

使用

import AvueFormDesign from 'avue-form-design'

Vue.prototype.$ELEMENT = { size: 'small' }
Vue.use(AvueFormDesign)
<avue-form-design :options="options"
                  :aside-left-width="270"
                  :aside-right-width="380"
                  storage
                  @submit="handleSubmit"><avue-from-design>

属性

参数 说明 类型 默认值
options 字段配置 Object { column: [] }
storage 开启本地存储功能,防止浏览器刷新丢失json Boolean false
asideLeftWidth 左工具栏宽度 String/Number '270px'
asideRightWidth 右工具栏宽度 String/Number '380px'

options字段配置

Avue文档

属性 说明 类型 可选值 默认值
column Avue字段 Array - []
labelPosition 字段位置 String 'left'/'center'/'right' 'left'
labelWidth 字段宽度 Number - 120
gutter 字段间隔 Number - 0
menuBtn 表单按钮 Boolean true/false false
menuPosition 表单按钮位置 String 'left'/'center'/'right' 'center'
submitBtn 显示提交按钮 Boolean true/false false
submitSize 提交按钮大小 String 'medium'/'small'/'mini' 'medium'
submitText 提交按钮文本 String - '提交'
emptyBtn 显示清空按钮 Boolean true/false false
emptySize 清空按钮大小 String 'medium'/'small'/'mini' 'medium'
emptyText 清空按钮文本 String - '清空'

事件

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

Avue插件

富文本

import AvueUeditor from 'avue-plugin-ueditor'

Vue.use(AvueUeditor)

坐标拾取器

import AvueMap from 'avue-plugin-map'

Vue.use(AvueMap)

打包

组件

$ yarn lib

源码

$ yarn build

捐赠

如果你觉得本项目帮助到你的话,可以给作者买杯咖啡。

License

MIT

The MIT License (MIT) Copyright (c) 2019-present SSC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

avue 表单设计器,自定义拓展插件 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/hedden/anyware-form-design.git
git@gitee.com:hedden/anyware-form-design.git
hedden
anyware-form-design
anyware-form-design
master

搜索帮助