vue-skutil-drawshape

1.0.0 • Public • Published

vue drawshape component adapt to skutil/datamodel used by the author privately.

Install

yarn add vue-skutil-drawshape

Usage

// global usage
import DrawShape from 'vue-skutil-drawshape'
Vue.use(DrawShape)

// single .vue file usage
<script>
import { InputRect, InputPolygon } from 'vue-skutil-drawshape'
export default {
  components: {
    InputRect,
    InputPolygon
  },
  ...
}
</script>

Example

<template>
  <input-rect :imgurl="imgurl" :rect.sync="rect" />
  <input-polygon :imgurl="imgurl" :polygon.sync="polygon" />
</template>

<script>
import { InputRect, InputPolygon } from 'vue-skutil-drawshape'

export default {
  components: {
    InputRect,
    InputPolygon
  },
  data() {
    return {
      imgurl: "https://xxxxxx.jpg"
      rect: undefined,
      polygon: undefined
    }
  }
}
</script>

Readme

Keywords

none

Package Sidebar

Install

npm i vue-skutil-drawshape

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

46 kB

Total Files

20

Last publish

Collaborators

  • stayknight