Git Product home page Git Product logo

lc's Introduction

JSON Form

通过拖拽widget到布局中,选择setting进入widget配置界面。

业务流程

  1. 到得所有元素: 正常html元素的属性中通过冒号绑定属性项,通过@绑定方法函数,<script>中可以配置schema和methods。
  2. 根据绑定的属性生成对应的编辑界面,采用双向绑定技术。
  3. 保存配置信息,后端生成对应访问页。

使用方法

通过下面的命令生成js lib (在dist目录中)

yarn run build 

在html中引用js lib.

 var jsonForm = new JsonForm("#box", "#widget"); 

重点技术

  1. 沙箱技术,防止非法js:with function & Proxy
  2. 双向绑定技术: Object.defineProperty & vDOM & Watcher

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.