diff --git a/breakChange-2.x.md b/breakChange-2.x.md
index 22c5b715c..83c852871 100644
--- a/breakChange-2.x.md
+++ b/breakChange-2.x.md
@@ -39,3 +39,7 @@ okButtonProps、cancelButtonProps 扁平化处理
## Mentions
v-model -> v-model:value
+
+## menu
+
+v-model -> v-model:selectedKeys :openKeys.sync -> v-mdoel:openKeys
diff --git a/components/_util/store/connect.jsx b/components/_util/store/connect.jsx
index d14591af4..2859edccc 100644
--- a/components/_util/store/connect.jsx
+++ b/components/_util/store/connect.jsx
@@ -1,5 +1,5 @@
import shallowEqual from 'shallowequal';
-import { inject, createVNode, watchEffect } from 'vue';
+import { inject, createVNode, watchEffect, toRaw } from 'vue';
import omit from 'omit.js';
import { getOptionProps } from '../props-util';
@@ -54,7 +54,7 @@ export default function connect(mapStateToProps) {
const nextSubscribed = finnalMapStateToProps(this.store.getState(), props);
if (
!shallowEqual(this.preProps, props) ||
- !shallowEqual(this.subscribed, nextSubscribed)
+ !shallowEqual(toRaw(this.subscribed), nextSubscribed)
) {
this.subscribed = nextSubscribed;
}
diff --git a/components/button/__tests__/__snapshots__/index.test.js.snap b/components/button/__tests__/__snapshots__/index.test.js.snap
index f56c71090..7876856dc 100644
--- a/components/button/__tests__/__snapshots__/index.test.js.snap
+++ b/components/button/__tests__/__snapshots__/index.test.js.snap
@@ -36,8 +36,8 @@ exports[`Button renders Chinese characters correctly 4`] = ``;
exports[`Button renders Chinese characters correctly 6`] = `
-
+
`;
exports[`Button renders correctly 1`] = `
diff --git a/components/button/__tests__/index.test.js b/components/button/__tests__/index.test.js
index dc4227271..8dae65b94 100644
--- a/components/button/__tests__/index.test.js
+++ b/components/button/__tests__/index.test.js
@@ -191,7 +191,7 @@ describe('Button', () => {
expect(wrapper.html()).toMatchSnapshot();
});
- fit('fixbug renders {0} , 0 and {false}', () => {
+ it('fixbug renders {0} , 0 and {false}', () => {
const wrapper = mount({
render() {
return ;
diff --git a/components/mentions/index.jsx b/components/mentions/index.jsx
index 21aee5e0e..af8cd4aff 100644
--- a/components/mentions/index.jsx
+++ b/components/mentions/index.jsx
@@ -4,7 +4,6 @@ import omit from 'omit.js';
import PropTypes from '../_util/vue-types';
import VcMentions from '../vc-mentions';
import { mentionsProps } from '../vc-mentions/src/mentionsProps';
-import Base from '../base';
import Spin from '../spin';
import BaseMixin from '../_util/BaseMixin';
import { ConfigConsumerProps } from '../config-provider';
@@ -171,7 +170,6 @@ const Mentions = {
/* istanbul ignore next */
Mentions.install = function(app) {
- app.use(Base);
app.component(Mentions.name, Mentions);
app.component(Mentions.Option.name, Mentions.Option);
};
diff --git a/components/vc-menu/DOMWrap.jsx b/components/vc-menu/DOMWrap.jsx
index 401dbfb93..456faa20f 100644
--- a/components/vc-menu/DOMWrap.jsx
+++ b/components/vc-menu/DOMWrap.jsx
@@ -288,7 +288,6 @@ const DOMWrap = {
render() {
const Tag = this.$props.tag;
-
return {this.renderChildren(getSlot(this))};
},
};
diff --git a/components/vc-menu/SubMenu.jsx b/components/vc-menu/SubMenu.jsx
index 2c4ff4d54..1e1b4e291 100644
--- a/components/vc-menu/SubMenu.jsx
+++ b/components/vc-menu/SubMenu.jsx
@@ -445,7 +445,7 @@ const SubMenu = {
let mouseEvents = {};
let titleClickEvents = {};
let titleMouseEvents = {};
- if (props.disabled === false) {
+ if (!props.disabled) {
mouseEvents = {
onMouseleave: this.onMouseLeave,
onMouseenter: this.onMouseEnter,
diff --git a/components/vc-menu/SubPopupMenu.jsx b/components/vc-menu/SubPopupMenu.jsx
index 49c58784b..3b34dd930 100644
--- a/components/vc-menu/SubPopupMenu.jsx
+++ b/components/vc-menu/SubPopupMenu.jsx
@@ -7,7 +7,13 @@ import classNames from 'classnames';
import { getKeyFromChildrenIndex, loopMenuItem, noop, isMobileDevice, menuAllProps } from './util';
import DOMWrap from './DOMWrap';
import { cloneElement } from '../_util/vnode';
-import { initDefaultProps, getOptionProps, getComponent, splitAttrs } from '../_util/props-util';
+import {
+ initDefaultProps,
+ getOptionProps,
+ getComponent,
+ splitAttrs,
+ getPropsData,
+} from '../_util/props-util';
function allDisabled(arr) {
if (!arr.length) {
@@ -45,12 +51,8 @@ export function getActiveKey(props, originalActiveKey) {
if (activeKey !== undefined && activeKey !== null) {
let found;
loopMenuItem(children, (c, i) => {
- const propsData = c.props || {};
- if (
- c &&
- propsData.disabled !== false &&
- activeKey === getKeyFromChildrenIndex(c, eventKey, i)
- ) {
+ const propsData = getPropsData(c);
+ if (c && !propsData.disabled && activeKey === getKeyFromChildrenIndex(c, eventKey, i)) {
found = true;
}
});
@@ -61,9 +63,9 @@ export function getActiveKey(props, originalActiveKey) {
activeKey = null;
if (defaultActiveFirst) {
loopMenuItem(children, (c, i) => {
- const propsData = c.props || {};
+ const propsData = getPropsData(c);
const noActiveKey = activeKey === null || activeKey === undefined;
- if (noActiveKey && c && propsData.disabled !== false) {
+ if (noActiveKey && c && !propsData.disabled) {
activeKey = getKeyFromChildrenIndex(c, eventKey, i);
}
});
diff --git a/components/vc-trigger/Trigger.jsx b/components/vc-trigger/Trigger.jsx
index 5d2b1253f..186fa05d8 100644
--- a/components/vc-trigger/Trigger.jsx
+++ b/components/vc-trigger/Trigger.jsx
@@ -412,7 +412,7 @@ export default {
...createRefHooks(this.savePopup),
};
return (
-
+
{getComponent(self, 'popup')}
);
diff --git a/examples/App.vue b/examples/App.vue
index 83a8f3d14..9563fb326 100644
--- a/examples/App.vue
+++ b/examples/App.vue
@@ -1,10 +1,11 @@