Giter Club home page Giter Club logo

liyiying19971214 / h5-dooring Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrxujiang/h5-dooring

0.0 0.0 0.0 16.38 MB

(H5编辑器)H5-Dooring是一款功能强大,开源免费的H5可视化页面配置解决方案,致力于提供一套简单方便、专业可靠、无限可能的H5落地页最佳实践。技术栈以react为主, 后台采用nodejs开发.

Home Page: http://49.234.61.19/h5_visible

License: GNU General Public License v3.0

JavaScript 1.23% TypeScript 60.20% CSS 33.77% HTML 0.20% Less 4.57% Dockerfile 0.02%

h5-dooring's Introduction

H5编辑器,H5制作神器,H5 editor,lowcode

Welcome to H5-Dooring 👋

Version Documentation License: MIT

H5-Dooring是一款功能强大,开源免费的H5可视化页面配置解决方案,致力于提供一套简单方便、专业可靠、无限可能的H5落地页最佳实践。技术栈以react为主, 后台采用nodejs开发。

H5-Dooring is a powerful, open source, free H5 visual page configuration solution dedicated to providing a simple, convenient, professional and reliable, unlimited set of H5 landing page best practices. The technology stack is mainly react, developed in the background using nodejs.

Demo

H5可视化编辑器 | H5 Visual Editor

Author

👤 徐小夕

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

技术栈 | The technology stack

  • React 前端主流框架(react,vue,angular)之一,更适合开发灵活度高且复杂的应用
  • dva 主流的react应用状态管理工具,基于redux
  • less css预编译语言,轻松编写结构化分明的css
  • umi 基于react的前端集成解决方案
  • antd 地球人都知道的react组件库
  • axios 强大的前端请求库
  • react-dnd 基于react的拖拽组件解决方案,具有优秀的设计哲学
  • qrcode.react 基于react的二维码生成插件
  • zarm 基于react的移动端ui库,轻松实现美观的H5应用
  • koa 基于nodejs的上一代开发框架,轻松实现基于nodejs的后端开发
  • @koa/router 基于koa2的服务端路由中间件
  • ramda 优秀的函数式js工具库

预览功能 | Preview features

预览功能这块比较简单, 我们只需要将用户生成的json数据丢进H5渲染器中即可, 这里我们需要做一个渲染页面单独用来预览组件. 先来看看几个预览效果:

The preview function is relatively simple, we just need to throw the user-generated jason data into the H5 renderer, here we need to make a rendering page for the preview components separately. Let's take a look at a few previews:

h5-editor


h5-editor

前面的渲染器原理已经介绍了, 这里就不一一介绍了,感兴趣的可以交流讨论.

实现在线下载功能 | Enable online download

在线下载这块我们需要用到一个开源库: file-saver, 专门解决前端下载文件困难的窘境. 具体使用举例:

var FileSaver = require('file-saver');
var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
FileSaver.saveAs(blob, "hello world.txt");

以上代码可以实现将传入的数据下载为txt文件, 如果是Blob, 是不是还能在线下载图片, html呢? 答案是肯定的, 所以我们的下载任务采用该方案来实现.

后端部分 | The back-end section

后端部分由于涉及的知识点比较多, 不是本文考虑的重点, 所以这里大致提几个点, 大家可以用完全不同的技术来实现后台服务, 比如说PHP, Java, Python或者Egg. 笔者这里采用的是koa. 主要实现功能如下:

  • 保存模板 | Save the template
  • 真机预览的数据源存储 | The data source store for the real machine preview
  • 用户相关功能 | User-related features
  • H5图床和静态文件托管 | H5 map bed and static file hosting

具体代码可以参考笔者的另一篇全栈开发文章

基于nodeJS从0到1实现一个CMS全栈项目

模式基本一致.

wiki(参考文档)

已完成功能 | The functionality is complete

  1. 组件库拖拽和显示
  2. 组件库动态编辑
  3. H5页面预览功能
  4. 保存H5页面配置文件
  5. 保存为模版
  6. 移动端跨端适配
  7. 媒体组件
  8. 在线下载网站代码功能
  9. 添加typescript支持
  10. 表单设计器/自定义表单组件
  11. 可视化组件Chart实现
  12. 在线编程模块(Mini Web IDE)
  13. 新增图表组件 面积图,折线图, 饼图
  14. 添加图片库,支持用户在线选择图片素材 15.升级图片组件为图文组件
  15. 添加模版库
  16. 添加可视化组件(基于g2)如折线图, 饼图, 面积图等
  17. form组件文本框字段修改
  18. 清空按钮添加确认框
  19. 表单组件中添加展示型文本,用来对字段说明
  20. 支持组件复制, 右键删除

正在完成功能 | The functionality is being completed

  • 丰富组件库组件 Enrich component library components
  • 添加配置交互功能 Add configuration interaction
  • 组件细分和代码优化 Component segmentation and code optimization
  • 单元测试 Unit tests

Install(安装)

  1. 下载代码 | Download the code
git clone https://github.com/MrXujiang/h5-Dooring.git
  1. 进入项目目录 | Go to the project catalog
cd ./h5-Dooring
  1. 安装依赖包 | Install the dependency package
yarn install 
or 
cnpm install

Usage

本地启动应用 | Launch the app locally

yarn start 
or 
cnpm run start

How to run the downloaded code ?

  1. 可以将压缩包解压直接放到服务器根目录, 访问根目录地址即可
  2. vscode安装Live Server插件, 将下载的压缩包解压成文件夹, 用vscode打开, 点击Live Server即可, 注意要删除启动路径的index.html, 改成/

如发现本地启动后组件拖拽遇到奇怪的报错, 是应为第三方组件在开发环境的bug, 可以采用一下方式解决:

If you find that the local start-up component drag encountered strange errors, is a bug that should be a third-party component in the development environment, can be resolved in a way:

yarn dev
or 
cnpm run dev

前提是先安装http-server模块.

Partner project

更新日志 | Update the log

  1. 添加在线编程模块(在执行代码前先启动node服务 npm run server)
  2. 添加客服机器人模块chatbot-antd
  3. 添加数据可视化模块
  4. 添加表单定制模块

持续升级 | Continuous upgrades

正在升级1.5版本,敬请期待...

赞助 | Sponsored

开源不易, 有了您的赞助, 我们会做的更好~

技术反馈和交流 | Technical feedback and communication

微信:beautifulFront

技术交流群(加作者微信进群) | chat whit author

h5-dooring's People

Contributors

aleryxu avatar mrxujiang avatar yehuozhili avatar zhangjinlongll avatar

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.