vue自由拖拽、缩放组件

2019-10-11  本文已影响0人  手指乐

github地址:https://github.com/kirillmurashov/vue-drag-resize

<template>
  <div>
    <VueDragResize :isActive="true"  :isResizable="false" >
      <img src="../assets/logo.png" v-drag height="100px" width="100px" />
    </VueDragResize>
  </div>
</template>

<style>
.vdr.active:before{
  outline: none
}
</style>
    
<script>
import VueDragResize from "vue-drag-resize";
export default {
  components: {
    VueDragResize
  },
  data() {
    return {};
  },
  methods: {},
  mounted() {
    
  }
};
</script>

:isResizable="false":不支持缩放,只支持拖拽
outline: none:去除拖拽组件的边框

上一篇下一篇

猜你喜欢

热点阅读