Skip to content

Commit

Permalink
docs: Update Vue3-moveable code example (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
shangchen0531 committed Jul 22, 2022
1 parent 7bbf614 commit 21c7629
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/vue3-moveable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ If you want to check the methods and events, please refer to the [**API document
```vue
<template>
<div class="container">
<div class="target">Vue Moveable</div>
<div class="target" ref="target">Vue Moveable</div>
<Moveable
className="moveable"
v-bind:target="['.target']"
Expand All @@ -126,13 +126,13 @@ export default {
},
methods: {
onDrag({ transform }) {
target.style.transform = transform;
this.$refs.target.style.transform = transform;
},
onScale({ drag }) {
target.style.transform = drag.transform;
this.$refs.target.style.transform = drag.transform;
},
onRotate({ drag }) {
target.style.transform = drag.transform;
this.$refs.target.style.transform = drag.transform;
},
}
}
Expand Down

0 comments on commit 21c7629

Please sign in to comment.