vue.js 23
< html > < head > < title > test23 </ title > </ head > < body > < div id = "app" > < counter :initial-counter = "counter" ></ counter > < checkbox ></ checkbox > </ div > < script src = "https://cdn.jsdelivr.net/npm/vue" > < / script > < script > Vue . component ( 'counter' ,{ props: [ 'initialCounter' ], template: '<button @click = "addCounter">{{counter}}</button>' , data : function (){ return { counter: this . initialCounter }; }, methods: { addCounter : function (){ this . counter += 1 ; ...