Skip to content

@vue/compat support #4368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
connected opened this issue Jul 14, 2021 · 6 comments
Closed
1 task done

@vue/compat support #4368

connected opened this issue Jul 14, 2021 · 6 comments
Labels

Comments

@connected
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

We currently have a big project running Vue 2 and Antd Vue 1.7.6 and would like to upgrade to Vue 3.

Vue 3 provides migration build (@vue/compat) that helps migrating to new codebase. We were able to start the project under compatibility build with warnings to be fixed as expected, but some Antd components crash with errors. Possibly due to the usage of undocumented features (private component properties/methods etc.)

For example:

SubPopupMenu.js crashes with "Cannot read property 'propsData' of undefined"; Trigger.js crashes with "this.renderComponent is not a function"

Running with "MODE: 3" set in compatConfig leads to: "TypeError: Cannot read property 'getPrefixCls' of undefined" for empty.js

What does the proposed API look like?

Antd Vue v1 should be tested against migration build and errors should be fixed thus making it possible to migrate to Vue 3.

@tangjinzhou
Copy link
Member

If you want to use vue3. you can use antd vue v2.2+.

@StarHosea
Copy link

same issue

@pabtab
Copy link

pabtab commented Jan 31, 2022

Same issue, how did you solve it?

@tianxiang24
Copy link

tianxiang24 commented Apr 28, 2022

Same issue, how did you solve it?

@tangjinzhou
ant design vue 2 don't support @vue/compat either. Will get the same error "TypeError: Cannot read property 'getPrefixCls' of undefined" for empty.js.

@YashKandalkar
Copy link

Hi, @tangjinzhou !
We're having the same error: Uncaught TypeError: Cannot read properties of undefined (reading 'getPrefixCls').
I have tried using the latest and the 2.2.8 version too but it gave the same error. Is there any way to make antdv work with @vue/compat? Please let me know if you need any additional information.

image

Package versions:

"vue": "^3.1.0",
"ant-design-vue": "^2.2",
"@vue/compat": "^3.1.0",

@github-actions
Copy link

github-actions bot commented Jun 3, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants