项目作者: moonrailgun

项目描述 :
A Layout Editor for Drag and Drop
高级语言: JavaScript
项目地址: git://github.com/moonrailgun/saucer.git
创建时间: 2020-11-17T08:59:34Z
项目社区:https://github.com/moonrailgun/saucer

开源协议:MIT License

下载


Saucer

A Layout Editor for Drag and Drop

What is Saucer

Saucer is a layout editor framework which can help you build your own layout editor. You can design your DSL, and let Saucer help you to finish other trivial work.

Why to use Saucer

We know, this world has been lots of layout editor, but those project is work for zero code develop, but saucer is make for meta develop, its means saucer have mini-size and easy to expand, and the output of saucer is more necessary.

Quick Start

  1. import React from 'react';
  2. import ReactDom from 'react-dom';
  3. import { regCup } from '@saucerjs/core';
  4. regCup({
  5. name: 'Button',
  6. displayName: 'Button Component',
  7. desc: 'This is a Button',
  8. type: 'leaf',
  9. render: () => {
  10. return <button>Click it!</button>;
  11. },
  12. });
  13. ReactDom.render(
  14. <div style={{ height: '100vh' }}>
  15. <SaucerEditor ></SaucerEditor>
  16. </div>,
  17. document.querySelector('#app')
  18. );

For Develop

  1. yarn run bootstrap

Build it

  1. yarn run build

Then, check for demo

  1. yarn run start

Proper Nouns

  • Saucer: This framework
  • Cup: Saucer have many cup, you can treat it as template.
  • Tea: The instance of a Cup, every tea have its own attributes.