Giter Club home page Giter Club logo

ly525 / luban-h5 Goto Github PK

View Code? Open in Web Editor NEW
6.0K 6.0K 1.3K 8.2 MB

[WIP]en: web design tool || mobile page builder/editor || mini webflow for mobile page. zh: 类似易企秀的H5制作、建站工具、可视化搭建系统.

Home Page: https://ly525.gitee.io/luban-h5

License: GNU General Public License v3.0

JavaScript 73.25% HTML 0.56% Vue 12.78% Shell 5.15% TypeScript 2.19% SCSS 4.02% EJS 2.04%
ant-design design-tool editor h5 mobile-page-maker page-builder page-editor page-generator page-maker strapi vue vuejs vuejs2 web-design web-design-framework webflow

luban-h5's Introduction

Hi there 👋

  • 🔭 I'm currently working on the crm web and low code in YMM.
  • 🌱 I’m currently learning Node/Python/UE(user experience).

Ly525's GitHub stats

You can also read my articles in blog

luban-h5's People

Contributors

cangku avatar dependabot[bot] avatar huifeiya avatar imgbotapp avatar jzyuchn avatar kkaaddff avatar kuan1 avatar ly525 avatar orange-cyl avatar sdshaoda avatar shihongzhi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

luban-h5's Issues

图床/Image Backup

编辑器模块

image

image

作品列表

image

基础数据统计(PV、UV 统计未完成)

image

表单统计

image

模板

image

image

#!zh: 在编辑面板编辑属性,并同步到中间画布 #!en: edit plugin props at the right panel

#!zh

  1. 获得编辑器的配置
  2. 使用 Plugin的 Props 的 defaultValue 初始化 Element
  3. 当点击画布元素的时候,设置其为 editingElement
  4. 在右边属性编辑器部分,遍历所有可以编辑的的属性
  5. 渲染属性对应的编辑器
$createElement(prop.editorType,  // 比如 el-input、el-input-number
  {
     props: 编辑器的一些props, // 比如编辑器的一些配置,比如el-range 需要max、min,
     value: 属性的对应初始值 // 一般取自 element  对应的 props 的值,
     on: { input: handler } // v-model 处理用户在编辑器改变了属性值
  }
}
  1. 最重要就是在v-model 对应的 @input 事件中,改变了对应prop值之后,重新渲染canvas即可,不过这一步会自动执行,因为 renderCanvas 会根据 elements 的变化自动更新画布

#!en

  1. getEditorConfigOfPlugin({name}}
  2. new Element({name, editorConfig})
  3. init Element with editorConfig(props default value)
  4. set editing element when clicking some element
  5. loop editable props of the editingElement
  6. render the prop editor with {propEditorType, propEditorProps, propValue, @input} = plugin.editorConfig.propsConfig
  7. when the value of prop is changed by editor, the canvas will be updated again.

关于箭头函数中的this:这里不能写成箭头函数,否则 this 为 undefined,为何?

// TODO 关于箭头函数中的this:这里不能写成箭头函数,否则 this 为 undefined,为何?
// http://davidshariff.com/blog/what-is-the-execution-context-in-javascript/
// https://tangxiaolang101.github.io/2016/08/01/%E6%B7%B1%E5%85%A5%E6%8E%A2%E8%AE%A8JavaScript%E7%9A%84%E6%89%A7%E8%A1%8C%E7%8E%AF%E5%A2%83%E5%92%8C%E6%A0%88%EF%BC%88What%20is%20the%20Execution%20Context%20&%20Stack%20in%20JavaScript%EF%BC%89/
get () {
return this.value
},


This issue was generated by todo based on a TODO comment in 9e8e89f. It's been assigned to @ly525 because they committed the code.

#!zh: 基本版本 Editor(#!en: basic editor): init editor

实现思路:

点击插件 -> 添加到画布上 -> 点击画布上的插件 -> 右侧编辑面板显示可以编辑的属性、修改属性值 -> 更新画布

  • 1. 通过 Vue.extends 集成核心编辑器
  • 2. 通过 npm install 的形式集成各种插件,如按钮、图片等 #100
  • 3. 点击插件列表中某个插件的时候,
    • 1. 获取该插件的可以配置的 props,设置默认值
    • 2. 将其映射到 Props Editor Panel,不同的prop 调用不同的编辑器即可
    • 3. 执行 currentPage.elements.push(new Element({ pluginName} = pluginMeta, defaultProps))
  • 6. vueInstance.render('div', {}, currentPage.elements),将该插件绘制到 中间画布上

#!zh: 在 string template 中取值

需要在 v-for 的时候,取值,绘制对应的icon

错误写法

如下的写法会报错,因为此时的 ${item.value} 取的是在 Editor.vue 中声明的变量,而非v-for="(item, index) in textAlignTabs"中的 item

     template: `
          <div class="wrap">
            <el-radio-group v-model="value_" size="small">
              <el-tooltip effect="dark" :content="item.label" placement="top" :key="index" v-for="(item, index) in textAlignTabs">
                <el-radio-button :label="item.value">
                  <i :class="['fa', 'fa-align-${item.value}']" aria-hidden="true"></i>
                </el-radio-button>
              </el-tooltip>
            </el-radio-group>
          </div>
  `,

正确写法

template: `
          <div class="wrap">
            <el-radio-group v-model="value_" size="small">
              <el-tooltip effect="dark" :content="item.label" placement="top" :key="index" v-for="(item, index) in textAlignTabs">
                <el-radio-button :label="item.value">
                  <i :class="['fa', 'fa-align-'+item.value]" aria-hidden="true"></i>
                </el-radio-button>
              </el-tooltip>
            </el-radio-group>
          </div>
`,

添加为何添加 class 的原因:与 handleClickCanvas 配合

class: 'element-on-edit-canvas', // TODO 添加为何添加 class 的原因:与 handleClickCanvas 配合
props: element.pluginProps, // #6 #3
nativeOn: {
// 高亮当前点击的元素
// click: () => this.handleClickElementProp(element)
}


This issue was generated by todo based on a TODO comment in eecd655. It's been assigned to @ly525 because they committed the code.

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.