kirillmurashov / vue-drag-resize

Vue2 && Vue3 Component for resize and drag elements
https://kirillmurashov.com/vue-drag-resize/
MIT License
2.24k stars 325 forks source link

Import problem when using with vue 3 #175

Open r0hit5292 opened 1 year ago

r0hit5292 commented 1 year ago

Description When we are trying to use vue drag and resize with vue3 basically on importing it gives us error and not working with vue 3 Screenshot from 2023-01-18 17-48-05

RodrigoSpinelli commented 1 year ago

Hello, did you manage to solve this bug?

r0hit5292 commented 1 year ago

n

Hello, did you manage to solve this bug?

not yet

r0hit5292 commented 1 year ago

Hello, did you manage to solve this bug?

do you have idea how to use it with vue 3

RodrigoSpinelli commented 1 year ago

honestly I researched and saw that it is a headache, I will try to make the component by hand

r0hit5292 commented 1 year ago

yes It is not working properly with Vue3 and also did not get any proper response from vue team also

JulessZ commented 1 year ago

Hi,

same here. As you mentioned if you split it as an individual component it works fine.

What I did is to copy the folder component to my folder X. And then I imported the component right from there. Not the best way and as it is a component not the right way, but it solved the issue.

Will see if I can fix the Liebery

r0hit5292 commented 1 year ago

Hi,

same here. As you mentioned if you split it as an individual component it works fine.

What I did is to copy the folder component to my folder X. And then I imported the component right from there. Not the best way and as it is a component not the right way, but it solved the issue.

Will see if I can fix the Liebery

have to tried it?

disha1202 commented 1 year ago

I think this issue is because vue-drag-resize does not have a typescript version

It can be fixed by adding declare module 'vue-drag-resize'; in .d.ts file.

r0hit5292 commented 1 year ago

I think this issue is because vue-drag-resize does not have a typescript version

It can be fixed by adding declare module 'vue-drag-resize'; in .d.ts file. can you explain it disha because you are talking about d.ts file which is present in node modules but what if some copy from my repo and install node modules again

disha1202 commented 1 year ago

I think this issue is because vue-drag-resize does not have a typescript version It can be fixed by adding declare module 'vue-drag-resize'; in .d.ts file. can you explain it disha because you are talking about d.ts file which is present in node modules but what if some copy from my repo and install node modules again

You'll have to create a .d.ts file somewhere in your project https://stackoverflow.com/a/49259337/16398346

RodrigoSpinelli commented 1 year ago

I managed to solve this error, but now I'm busy, later I can help you if you still need it

r0hit5292 commented 1 year ago

I managed to solve this error, but now I'm busy, later I can help you if you still need it thanks can you please explain how you managed to solve this issue?

RodrigoSpinelli commented 1 year ago

I managed to solve it this way, I created a root file called tsconfig.json and filled it with this information -> ' { "allowJs": true, "noImplicitAny": false} ' and lastly i reinstalled using this command: ' npm i -s vue-drag-resize 'and it worked image

r0hit5292 commented 1 year ago

I managed to solve it this way, I created a root file called tsconfig.json and filled it with this information -> ' { "allowJs": true, "noImplicitAny": false} ' and lastly i reinstalled using this command: ' npm i -s vue-drag-resize 'and it worked image

but if we off noimpicitAny typescript is off in that case we are not any type error also because its mean typescipt is off

sparrow522 commented 1 year ago

vue3 import VueDragResize from 'vue-drag-resize/src/components/vue-drag-resize.vue'; ✌🏻

InsHomePgup commented 5 months ago

vue3 import VueDragResize from 'vue-drag-resize/src/components/vue-drag-resize.vue'; ✌🏻

Thank you ,it's works.