Giter Site home page Giter Site logo

qq15725 / yh5 Goto Github PK

View Code? Open in Web Editor NEW
60.0 6.0 9.0 7.31 MB

💬 Visual production tool, draggable, resizable, sketch for Vue 2.x

Home Page: http://yh5js.com

License: MIT License

Vue 27.66% JavaScript 58.05% HTML 0.04% Stylus 0.08% SCSS 14.18%
vue sketch draggable json-generator yh5

yh5's Introduction

Yh5 Logo

Version Documentation Maintenance License: MIT

基于 Vue 2.0 快速搭建中后台(hpaPaaS平台)数据驱动、可视化编辑的组件库

通过 Photoshop 导出 psd 文件,自动生成响应式页面能力

Webpack 安装

npm install --save yh5

npm install sass sass-loader fibers deepmerge -D

添加至你的vue应用:

import Vue from 'vue'
import Yh5 from 'yh5/lib/framework'
import {
  VCanvas,
  VDraggable,
  VResizable,
  VDraggableResizable,
} from 'yh5/lib/components'

Vue.use(Yh5, {
  components: {
    VCanvas,
    VDraggable,
    VResizable,
    VDraggableResizable,
  }
})

使用 CDN

<!DOCTYPE html>
<html>
<head>
  <link href="https://cdn.jsdelivr.net/npm/yh5/dist/yh5.min.css" rel="stylesheet">
  <script src="https://cdn.jsdelivr.net/npm/vue"></script>
  <script src="https://cdn.jsdelivr.net/npm/yh5/dist/yh5.min.js"></script>

  <!-- v-swiper 依赖 vue-awesome-swiper -->

  <!--<link href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.7/css/swiper.min.css" rel="stylesheet">-->
  <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.7/js/swiper.min.js"></script>-->
  <!--<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-awesome-swiper.js"></script>-->
</head>

<body>
<div id="app">
  <v-canvas
    height="100vh"
    width="100vw"
    v-model="data"
    editable
    absolute
  >
  </v-canvas>
</div>

<script>
  new Vue({
    el: '#app',
    data: {
      data: [
        {
          tag: 'img',
          src: 'https://picsum.photos/id/11/500/300',
          width: 300,
          height: 300,
        }
      ]
    },
  })
</script>
</body>

</html>

参考

yh5's People

Contributors

dependabot[bot] avatar qq15725 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

yh5's Issues

想要知道元素移动过程中找线的逻辑,想知道这部分逻辑的源码在哪里

您好,我在知乎上看到您的这个项目,想请教下元素移动过程中是怎么找线的。
比如一个元素移动时发现跟另一个元素中线对齐了,这时候要显示一条对齐的线。请问您是怎么判断该跟哪个元素对齐,怎么判断他们对齐了,以及怎么把线渲染出来。
所以能帮忙指出来这部分逻辑是在源码的哪一部分吗?我找了很长时间找不到。

同学,您这个项目引入了560个开源组件,存在22个漏洞,辛苦升级一下

检测到 qq15725/yh5 一共引入了560个开源组件,存在22个漏洞

漏洞标题:serialize-javascript 代码问题漏洞
缺陷组件:[email protected]
漏洞编号:CVE-2020-7660
漏洞描述:Verizon serialize-javascript是美国威瑞森电信(Verizon)公司的一款支持将JavaScript序列化为 JSON超集的软件包。
serialize-javascript 3.1.0之前版本中存在代码问题漏洞。远程攻击者可借助index.js文件中的‘deleteFunctions’函数利用该漏洞注入任意代码。
国家漏洞库信息:https://www.cnvd.org.cn/flaw/show/CNVD-2020-53801
影响范围:(∞, 3.1.0)
最小修复版本:3.1.0
缺陷组件引入路径:@->[email protected]>[email protected]>[email protected]

另外还有22个漏洞,详细报告:https://mofeisec.com/jr?p=ic30ea

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.