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

build project with 'vue-cli 2', if some function named 'functionClickHandle' and bind with '@click="functionClickHandle()"', It will run automatically. #9920

Closed
lk19940215 opened this issue Apr 25, 2019 · 3 comments

Comments

@lk19940215
Copy link

Version

2.5.9

Reproduction link

https://github.com/lk19940215/vue-issue

Steps to reproduce

  1. clone my github project

npm i
npm run dev

  1. {{i}}
    // looks like '()‘ is required.

something happend

window.alert(1i am big boss)
window.alert(2i am big boss)

because it run's automatically.

but window.alert('item click changed') did not.

What is expected?

i just want to report.

What is actually happening?

run automatically


vue version >= 2.5.2

One day I maintain an old project, something just happend, my web page always redirected to anothoer page. until i change the function named 'functionClickHandle' with 'itemClick'. because 'functionClickHandle' has some judgments inside, and run automatically.

@Justineo Justineo added the bug label Apr 25, 2019
@Justineo
Copy link
Member

Justineo added a commit to Justineo/vue that referenced this issue Apr 25, 2019
@Justineo
Copy link
Member

You can use a method name without function for now as a work around. eg. functionClickHandleclickHandle

@lk19940215
Copy link
Author

lk19940215 commented Apr 25, 2019

You can use a method name without function for now as a work around. eg. functionClickHandleclickHandle
谢谢。
提个issue,BUG肯定解决了的。

kiku-jw pushed a commit to kiku-jw/vue that referenced this issue Jun 18, 2019
Lostlover pushed a commit to Lostlover/vue that referenced this issue Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants