2.0.1 • Published 3 years ago

@halobear/vue-shape v2.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

@halobear/vue-shape

编辑素材形状尺寸(vue3.0 组件)

demo gif 效果

demo gif 效果

安装

yarn add @halobear/vue-shape

使用

<template>
  <div>{{ state }}</div>
  <shape :x="state.x" :y="state.y" :w="state.w" :h="state.h" :r="state.r" @change="state = $event">
    <!-- <div class="card">这里是内容</div> -->
    <img
      class="card"
      src="https://www.luzhongkuan.cn/static/temp/0b97b79a76eb5d3e29582778ab2ea0bc.jpeg"
      @dragstart.prevent
    />
  </shape>
</template>

<script>
import { ref } from 'vue'
import shape from '@halobear/vue-shape'
import '@halobear/vue-shape/lib/style.css'

export default {
  components: {
    shape,
  },
  setup() {
    const state = ref({
      x: 300, // x方向定位
      y: 300, // y方向定位
      w: 210, // 宽度
      h: 250, // 高度
      r: 30, // 旋转角度
    })
    return {
      state,
    }
  },
}
</script>
2.0.1

3 years ago

2.0.0

3 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.2-alpha.1

4 years ago

1.0.0

4 years ago