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

Vue-@click后边( ) 有无括号的区别 #48

Open
PleaseStartYourPerformance opened this issue Jun 23, 2021 · 0 comments
Open

Vue-@click后边( ) 有无括号的区别 #48

PleaseStartYourPerformance opened this issue Jun 23, 2021 · 0 comments

Comments

@PleaseStartYourPerformance
Copy link
Owner

@click="Login()"
@click="Login"

而唯一的区别就是,有括号的可以在括号里写传递的参数。

而不写括号,他会默认传event参数。

在vue中,切记这是在vue中。

如果在原生js中,只有写()才会被调用

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

No branches or pull requests

1 participant