moveable icon indicating copy to clipboard operation
moveable copied to clipboard

Using vue-moveable in vue template, the moveable element display is none

Open chenp1204 opened this issue 3 years ago • 10 comments

Environments

  • Framework name: Vue
  • Framework version: 2.6.13
  • Moveable Component version: 2.0.0-beta.4
  • Testable Address(optional):

Description

Hi, @daybrush When i using vue-moveable in vue template, the moveable element display is none, but i don't know why, if is wrong in my config? 111 222

chenp1204 avatar Nov 16 '21 03:11 chenp1204

@chenp1204

From version 2 of vue-moveable, you have to set the target directly.

How to use is as fo. llows.

<Moveable v-bind:target="['.target']"/>
<div class="target">Hellow World</div>
</div>

daybrush avatar Nov 16 '21 03:11 daybrush

@daybrush Thank you!The doc not update yet, Can you give me a demo of using 2.0.0-beta.4 in vue2 or api doc of 2.0.0-beta.4

chenp1204 avatar Nov 16 '21 06:11 chenp1204

@chenp1204

https://daybrush.com/moveable/storybook

https://daybrush.com/moveable/storybook2

The vue demo is in preparation. It will be added before 2.0.0.

You can apply the properties and events of other framework demos to vue as they are.

daybrush avatar Nov 16 '21 16:11 daybrush

@daybrush Thank you very much for your hard work

chenp1204 avatar Nov 17 '21 03:11 chenp1204

how to use it with Multiple target in vue ? i can not find the demo or doc @daybrush

fengjianying avatar Aug 30 '22 07:08 fengjianying

@fengjianying

You can use an array or queryString.



<Moveable
     :target="target" />


this.target=[element1, element2];

daybrush avatar Aug 30 '22 17:08 daybrush

@fengjianying

A demo of vue is in preparation.

A Vue 3 demo will probably be released next month.

daybrush avatar Aug 30 '22 18:08 daybrush

Duplicate of #

@fengjianying

A demo of vue is in preparation.

A Vue 3 demo will probably be released next month.

@fengjianying

You can use an array or queryString.

<Moveable
     :target="target" />


this.target=[element1, element2];

this demo is too simple, can you give a demo online? or give more infomation? thank you every much!

fengjianying avatar Aug 31 '22 03:08 fengjianying

@fengjianying

Currently only react demo.

https://daybrush.com/moveable/storybook2

daybrush avatar Aug 31 '22 03:08 daybrush

d

@fengjianying

Currently only react demo.

https://daybrush.com/moveable/storybook2

i have a question in https://codesandbox.io/s/serene-varahamihira-zwh6xr?file=/src/App.tsx

how to dynamic add the target ?

fengjianying avatar Sep 01 '22 06:09 fengjianying