Skip to content

Commit a2f7d6d

Browse files
authored
feat: Vue 3 Migration Build support (#5973), close #5765
closes #5765 Add `compatConfig: { MODE: 3 }` to all component definitions to signal to `@vue/compat` not to use any Vue 2 compatibility features.
1 parent b35f637 commit a2f7d6d

File tree

199 files changed

+205
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+205
-0
lines changed

components/_util/ActionButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function isThenable(thing?: PromiseLike<any>): boolean {
2626
}
2727

2828
export default defineComponent({
29+
compatConfig: { MODE: 3 },
2930
name: 'ActionButton',
3031
props: actionButtonProps,
3132
setup(props, { slots }) {

components/_util/BaseInput.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineComponent, ref, withDirectives } from 'vue';
22
import antInput from './antInputDirective';
33
import PropTypes from './vue-types';
44
const BaseInput = defineComponent({
5+
compatConfig: { MODE: 3 },
56
props: {
67
value: PropTypes.string.def(''),
78
},

components/_util/Portal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import { useInjectPortal } from '../vc-trigger/context';
1212

1313
export default defineComponent({
14+
compatConfig: { MODE: 3 },
1415
name: 'Portal',
1516
inheritAttrs: false,
1617
props: {

components/_util/PortalWrapper.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const getParent = (getContainer: GetContainer) => {
4949
export type GetContainer = string | HTMLElement | (() => HTMLElement);
5050

5151
export default defineComponent({
52+
compatConfig: { MODE: 3 },
5253
name: 'PortalWrapper',
5354
inheritAttrs: false,
5455
props: {

components/_util/__mocks__/Portal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineComponent } from 'vue';
22

33
export default defineComponent({
4+
compatConfig: { MODE: 3 },
45
name: 'Portal',
56
inheritAttrs: false,
67
props: ['getContainer'],

components/_util/transButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const inlineStyle = {
1515
};
1616

1717
const TransButton = defineComponent({
18+
compatConfig: { MODE: 3 },
1819
name: 'TransButton',
1920
inheritAttrs: false,
2021
props: {

components/_util/wave.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function isNotGrey(color: string) {
2121
return true;
2222
}
2323
export default defineComponent({
24+
compatConfig: { MODE: 3 },
2425
name: 'Wave',
2526
props: {
2627
insertExtraNode: Boolean,

components/affix/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export type AffixExpose = {
7272

7373
export type AffixInstance = ComponentPublicInstance<AffixProps, AffixExpose>;
7474
const Affix = defineComponent({
75+
compatConfig: { MODE: 3 },
7576
name: 'AAffix',
7677
props: affixProps(),
7778
setup(props, { slots, emit, expose }) {

components/alert/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const alertProps = () => ({
6363
export type AlertProps = Partial<ExtractPropTypes<ReturnType<typeof alertProps>>>;
6464

6565
const Alert = defineComponent({
66+
compatConfig: { MODE: 3 },
6667
name: 'AAlert',
6768
inheritAttrs: false,
6869
props: alertProps(),

components/anchor/Anchor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export interface AnchorState {
7373
}
7474

7575
export default defineComponent({
76+
compatConfig: { MODE: 3 },
7677
name: 'AAnchor',
7778
inheritAttrs: false,
7879
props: anchorProps(),

0 commit comments

Comments
 (0)