@halobear/vue-shape

vue3.0编辑素材形状尺寸组件
620 1
Install
npm install @halobear/vue-shape
Latest Version:2.0.1
Vue:3
Older releases:2
License:ISC
Last Updated:May 26, 2021
Links: GitHub  ·  npm
Maintainer: wtwei

@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>

Related Packages

es-drager

A draggable, resizable, rotatable component based on vue3

74,141 461
@minogin/vue-drag-resize-rotate

Vue component which acts as a draggable, resizable and rotateable container for...

7,341 78
vue-drr

A Vue2 component for draggable, resizable, rotatable elements

959
rundle-elementui

基于element-plus二次封装组件

615 0
vue-drag-resize-rotate

a vue2 component. Taking a cue from react-resizable and react-draggable.

4,610

Version History

Version Released Vue License
2.0.1 ^3.0.5 ISC
2.0.0 ^3.0.5 ISC
1.1.1 ^2.6.11 ISC
1.1.0 ^2.6.11 ISC
1.0.12 ^2.6.11 ISC
Pre-releases (1)
Version Released Vue License
1.0.2-alpha.1 ^2.6.10 ISC