mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-29 18:48:32 +08:00
fix: menu loose submenu id
This commit is contained in:
parent
cc2d1551b7
commit
ef51ede2ce
@ -30,7 +30,7 @@ exports[`renders ./antdv-demo/docs/auto-complete/demo/custom.md correctly 1`] =
|
||||
<div class="ant-select ant-select-show-search ant-select-auto-complete ant-select-single ant-select-customize-input" style="width: 200px;">
|
||||
<!---->
|
||||
<!---->
|
||||
<div class="ant-select-selector"><span class="ant-select-selection-search"><textarea placeholder="input here" class="ant-input" id="rc_select_TEST_OR_SSR" autocomplete="off" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0"></textarea></span>
|
||||
<div class="ant-select-selector"><span class="ant-select-selection-search"><textarea placeholder="input here" class="ant-input ant-select-selection-search-input" style="height: 50px;" id="rc_select_TEST_OR_SSR" autocomplete="off" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0"></textarea></span>
|
||||
<!----><span class="ant-select-selection-placeholder"><!----></span>
|
||||
</div>
|
||||
<!---->
|
||||
|
@ -98,7 +98,7 @@
|
||||
@ease-base-in: cubic-bezier(0.9, 0, 0.3, 0.7);
|
||||
@ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
@ease-in: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
||||
@ease-in-out: cubic-bezier(0.25, 0.8, 0.5, 1);
|
||||
@ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
@ease-out-back: cubic-bezier(0.12, 0.4, 0.29, 1.46);
|
||||
@ease-in-back: cubic-bezier(0.71, -0.46, 0.88, 0.6);
|
||||
@ease-in-out-back: cubic-bezier(0.71, -0.46, 0.29, 1.46);
|
||||
|
@ -432,6 +432,13 @@ const SubMenu = defineComponent({
|
||||
const isOpen = this.isOpen;
|
||||
const prefixCls = this.getPrefixCls();
|
||||
const isInlineMode = props.mode === 'inline';
|
||||
if (!this.internalMenuId) {
|
||||
if (props.eventKey) {
|
||||
this.internalMenuId = `${props.eventKey}$Menu`;
|
||||
} else {
|
||||
this.internalMenuId = `$__$${++guid}$Menu`;
|
||||
}
|
||||
}
|
||||
const children = this.renderChildren();
|
||||
const className = {
|
||||
[prefixCls]: true,
|
||||
@ -442,14 +449,6 @@ const SubMenu = defineComponent({
|
||||
[this.getDisabledClassName()]: props.disabled,
|
||||
[this.getSelectedClassName()]: this.isChildrenSelected || this.isChildrenSelected2(),
|
||||
};
|
||||
if (!this.internalMenuId) {
|
||||
if (props.eventKey) {
|
||||
this.internalMenuId = `${props.eventKey}$Menu`;
|
||||
} else {
|
||||
this.internalMenuId = `$__$${++guid}$Menu`;
|
||||
}
|
||||
}
|
||||
|
||||
let mouseEvents = {};
|
||||
let titleClickEvents = {};
|
||||
let titleMouseEvents = {};
|
||||
|
@ -62,8 +62,8 @@
|
||||
},
|
||||
"homepage": "https://www.antdv.com/",
|
||||
"peerDependencies": {
|
||||
"@vue/compiler-sfc": ">=3.0.2",
|
||||
"vue": ">=3.0.2"
|
||||
"@vue/compiler-sfc": ">=3.0.4",
|
||||
"vue": ">=3.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.8.4",
|
||||
@ -92,7 +92,7 @@
|
||||
"@typescript-eslint/parser": "^4.1.0",
|
||||
"@vue/babel-plugin-jsx": "^1.0.0-rc.3",
|
||||
"@vue/cli-plugin-eslint": "^4.0.0",
|
||||
"@vue/compiler-sfc": "^3.0.2",
|
||||
"@vue/compiler-sfc": "^3.0.4",
|
||||
"@vue/eslint-config-prettier": "^6.0.0",
|
||||
"@vue/eslint-config-typescript": "^5.1.0",
|
||||
"@vue/test-utils": "^2.0.0-beta.2",
|
||||
@ -178,7 +178,7 @@
|
||||
"umi-mock-middleware": "^1.0.0",
|
||||
"umi-request": "^1.3.5",
|
||||
"url-loader": "^3.0.0",
|
||||
"vue": "^3.0.2",
|
||||
"vue": "^3.0.4",
|
||||
"vue-antd-md-loader": "^1.2.1-beta.1",
|
||||
"vue-clipboard2": "0.3.1",
|
||||
"vue-draggable-resizable": "^2.1.0",
|
||||
|
Loading…
Reference in New Issue
Block a user