@luzhongk/vue-shape

0.0.10-alpha.0 • Public • Published

@luzhongk/vue-shape

编辑素材形状尺寸

安装

yarn add @luzhongk/vue-shape

使用

<template>
  <div class="test-container">
    <h2 class="title">@luzhongk/vue-shape</h2>
    <div class="shape-outer">
      <vue-shape
        :x="data.x"
        :y="data.y"
        :w="data.w"
        :h="data.h"
        @change="data = $event"
      />
    </div>
    {{ data }}
  </div>
</template>

<script>
  import VueShape from "@luzhongk/vue-shape";

  // 其他属性
  // disabled
  // draggable

  export default {
    components: {
      VueShape
    },
    data() {
      return {
        data: {
          x: 0,
          y: 0,
          w: 100,
          h: 200
        }
      };
    }
  };
</script>

<style lang="less" scoped>
  .shape-outer {
    position: relative;
    background: #eee;
    width: 500px;
    height: 500px;
    margin: 0 auto;
  }
</style>

示例

Readme

Keywords

Package Sidebar

Install

npm i @luzhongk/vue-shape

Weekly Downloads

2

Version

0.0.10-alpha.0

License

ISC

Unpacked Size

77.1 kB

Total Files

7

Last publish

Collaborators

  • luzhongk