MediaWiki:Centralnotice-template-ppenloglou dsk lg vueJsDemo

From Meta, a Wikimedia project coordination wiki

<script>

 mw.loader.using(["vue"]).then(function (require) {
   const Vue = require("vue");
   const Counter = {
     data() {
       return {
         count: 0,
       };
     },
     template: `

                       <button @click="increment">Increment</button>
               `,
     methods: {
       increment() {
         this.count++;
         console.log(this.count);
       },
     },
   };
   // Mount the HelloWorld component to the placeholder div
   Vue.createMwApp(Counter).mount("#frb");
 });

</script>