[Vuejs]-How to receive data in root component with method?

0👍

Try to assign the returned data to a variable then show it using alert or console.log a,d use this instead of someForm:

    var someForm = Vue.createApp ({
    methods: {
        submitBtn: function(){
          let data=  this.showData();
           alert(data);
        },
        showData: function(){
            return 1
        }
    }
})

Leave a comment