@halobear/vue-shape
@halobear/vue-shape
编辑素材形状尺寸(vue3.0 组件)
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
@minogin/vue-drag-resize-rotate
Vue component which acts as a draggable, resizable and rotateable container for...
7,341
78
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 | |
| 1.0.11 | ^2.6.11 | ISC | |
| 1.0.10 | ^2.6.11 | ISC | |
| 1.0.9 | ^2.6.10 | ISC | |
| 1.0.8 | ^2.6.10 | ISC | |
| 1.0.7 | ^2.6.10 | ISC | |
| 1.0.6 | ^2.6.10 | ISC | |
| 1.0.5 | ^2.6.10 | ISC | |
| 1.0.2 | ^2.6.10 | ISC | |
| 1.0.1 | ^2.6.10 | ISC | |
| 1.0.0 | ^2.6.10 | ISC |
Pre-releases (1)
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.2-alpha.1 | ^2.6.10 | ISC |