File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -501,14 +501,14 @@ Here's an example:
501
501
502
502
``` js
503
503
Vue .component (' button-counter' , {
504
- template: ' <button v-on:click="increment ">{{ counter }}</button>' ,
504
+ template: ' <button v-on:click="incrementCounter ">{{ counter }}</button>' ,
505
505
data : function () {
506
506
return {
507
507
counter: 0
508
508
}
509
509
},
510
510
methods: {
511
- increment : function () {
511
+ incrementCounter : function () {
512
512
this .counter += 1
513
513
this .$emit (' increment' )
514
514
}
@@ -536,14 +536,14 @@ new Vue({
536
536
</div >
537
537
<script >
538
538
Vue .component (' button-counter' , {
539
- template: ' <button v-on:click="increment ">{{ counter }}</button>' ,
539
+ template: ' <button v-on:click="incrementCounter ">{{ counter }}</button>' ,
540
540
data : function () {
541
541
return {
542
542
counter: 0
543
543
}
544
544
},
545
545
methods: {
546
- increment : function () {
546
+ incrementCounter : function () {
547
547
this .counter += 1
548
548
this .$emit (' increment' )
549
549
}
You can’t perform that action at this time.
0 commit comments