Is this hidden logic? #10089
Replies: 3 comments 2 replies
-
In the Vue scope, it's a little clunky this syntax (IMHO), but if you read docs, specially v-bind definition, you can find:
So, if you use |
Beta Was this translation helpful? Give feedback.
-
See the compiled code https://play.vuejs.org/#eNp9kMtqwzAQRX9FzKqF4BCyC47pgyzaRVvaLrUxysRWIktCGiUG43+PpJDHImQn7jka7swAr9YW+4CwgJKws6omrLhmrGxn7EUoKXZLDk/PbFmxYeRQldN2FoVyemPDBMgLozeyKbbe6DhsSDM4CNNZqdB9W5JGew4LlklitVLm8JkzcgEn51y0KHZ38q3vU8bhx6FHt0cOF0a1a5BOePX3hX18X2Bn1kFF+wH8RW9USB1P2lvQ61j7xsttPzprHEnd/PtVT6j9ealUNJlj9jnEi74/WP1ad17M8z+uRxiPv81/yQ==. In vue's virtual dom implementation we convert |
Beta Was this translation helpful? Give feedback.
-
I found the event cannot be triggered if I use the |
Beta Was this translation helpful? Give feedback.
-
Why can ’v-bind‘ bind events? When there is a property in the component with the same name as the event (on+Event), why can it also correctly get the value corresponding to this event?
Parent Component:
Child Component:
Playground:
https://play.vuejs.org/#eNp9Ustu2zAQ/JUtUcAKkEpIcnPloA+kaHtogzZAL7wo0kpWQpEEuXJcCPr3LinZtQMnJ2l3ZodD7gzio7XppkexFLkvXWsJPFJvr6VuO2scwQAOaxihdqaDBVMXe+iz6ezcT7NQBCWGpS6N9gSdb2AVxpPFV1TKwB/jVPVmcSZ13euSWqPBr81TcjZIDVAodJRcMjpKnWeTHTbCBWFnVUHIFUC+vrgehqg+jnnGVexGN5t3962uVlIMRt+hp2XQH6WAjEl5dqAjzgV59lm3TfrgjeYXiC6kKFmoZS8/bXDopVhCRAJW8DWevsceuR7Pd/1yjeXjif6D34aeFLcOPboNSrHHqHAN0gTf/P6BW/7fg52pesXsV8Bf6I3qg8eJ9qnXFds+4EW33+KyWt3c+Zstofa7SwWjgTlGvhS8vPCGL139v92r9CrO8aL4FXeLPxEhgH2IKqxbjbfOWH8UpvdhvwBTYGyEV4fkZD5/XudcAdBfi8svc4rmC0MYLHpFHCg2FxrxM3KkdocYhakyTRKPSifVCL8WuPueiLP6oVRt+cjheotdS8mCeJbDLCKJLXF5EfnZNBCl+OlOSRyef6Rw+UzhOLTjP8sEPMk=
Beta Was this translation helpful? Give feedback.
All reactions