vue-drag-resize icon indicating copy to clipboard operation
vue-drag-resize copied to clipboard

Import problem when using with vue 3

Open r0hit5292 opened this issue 2 years ago • 16 comments

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

r0hit5292 avatar Jan 19 '23 07:01 r0hit5292

Hello, did you manage to solve this bug?

RodrigoSpinelli avatar Feb 03 '23 12:02 RodrigoSpinelli

n

Hello, did you manage to solve this bug?

not yet

r0hit5292 avatar Feb 03 '23 12:02 r0hit5292

Hello, did you manage to solve this bug?

do you have idea how to use it with vue 3

r0hit5292 avatar Feb 03 '23 12:02 r0hit5292

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

RodrigoSpinelli avatar Feb 03 '23 12:02 RodrigoSpinelli

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

r0hit5292 avatar Feb 03 '23 12:02 r0hit5292

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

JulessZ avatar Feb 04 '23 15:02 JulessZ

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?

r0hit5292 avatar Feb 07 '23 06:02 r0hit5292

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.

disha1202 avatar Feb 08 '23 07:02 disha1202

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

r0hit5292 avatar Feb 08 '23 08:02 r0hit5292

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

disha1202 avatar Feb 08 '23 08:02 disha1202

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

RodrigoSpinelli avatar Feb 08 '23 16:02 RodrigoSpinelli

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?

r0hit5292 avatar Feb 09 '23 03:02 r0hit5292

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

RodrigoSpinelli avatar Feb 09 '23 13:02 RodrigoSpinelli

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

r0hit5292 avatar Feb 10 '23 11:02 r0hit5292

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

sparrow522 avatar Aug 03 '23 09:08 sparrow522

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

Thank you ,it's works.

InsHomePgup avatar Mar 22 '24 17:03 InsHomePgup