Coder Social home page Coder Social logo

mini-luban-h5's Introduction

mini-luban-h5

  • 低代码平台研究
  • 移动端的 h5 参考方案,快速生成 h5
  • 通过 JSON => createElement => UI
  • 参考项目 luban-h5

mini-editor 核心代码

import App from "./mini-editor/index";
import "./mini-editor/plugins/ant-design-vue.js";
import "./mini-editor/plugins/font.js";
import "./mini-editor/support/index";
import "./mini-editor/styles/index.scss";
  • App 编辑器核心页面
  • ant-design-vue 注册 ant-design 组件库
  • font 引入 font-awesome 字体库
  • support 自定义属性编辑器
  • styles/index 全局样式
// 中间画布区域
<CanvasWrapper>
  <lbs-shape>
  { this.editingElement && h(LbpComponent.name, this.editingElement.getPreviewData({ mode: 'edit' })) }
  </lbs-shape>
</CanvasWrapper>
// 右边属性区域
<PropsPanelWrapper></PropsPanelWrapper>
  • CanvasWrapper 中间画布内容区域

  • lbs-shape 组件外面操作区域 包含操作点,以及拖拽事件

  • h() 渲染组件内容

  • PropsPanelWrapper 属性面板操作区域

  • PropsPanel 属性面板,这里分常用属性和自定义属性

  • src/common/props 定义了常用属性编辑器

新增自定义组件及测试

  1. src/component下面编写自定义组件
  2. src/mini-editor/index.js,如下引入组件,并注册
// 引入自定义组件,并全局注册
// import LbpComponent from '../component/index.js'
import LbpComponent from '../component/entry.button.exmaple.js'

Vue.component(LbpComponent.name, LbpComponent)

mini-luban-h5's People

Stargazers

 avatar

Watchers

 avatar

Forkers

buxiua

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.