Giter Site home page Giter Site logo

yijie8 / avue-form-design Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sscfaith/avue-form-design

0.0 1.0 0.0 1.87 MB

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

Home Page: http://112.74.43.150/

License: MIT License

JavaScript 27.46% Vue 59.90% CSS 8.62% HTML 0.54% TSQL 0.78% PHP 2.71%

avue-form-design's Introduction

简介

本项目是一款基于 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.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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.