Skip to content
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

element-ui 手动控制 dropdown 显示 #107

Open
nmsn opened this issue Dec 7, 2023 · 1 comment
Open

element-ui 手动控制 dropdown 显示 #107

nmsn opened this issue Dec 7, 2023 · 1 comment
Labels

Comments

@nmsn
Copy link
Owner

nmsn commented Dec 7, 2023

No description provided.

@nmsn nmsn added the Vue label Dec 7, 2023
@nmsn
Copy link
Owner Author

nmsn commented Dec 7, 2023

<el-dropdown ref="dropdown">
    ......    
</el-dropdown>

通过 ref 手动修改组件实例的 visible 方法

this.$refs.dropdown.visible = false;

或者通过 ref 调用组件实例上的 show、hide 方法

this.$refs.dropShow.show()
this.$refs.dropShow.hide()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant