When a promise object is called within the method of a click event, what does return go out?

in a normal click event method, a promise object is called. Is return the promise object itself or its result?

<Button @click="javaCodeSubmit"></Button>


javaCodeSubmit(){
    return genJavaCode()
        .then(res => {
            this.showGenJava = false
    })
 }

Jan.30,2022

is also a promise object, of course, you can add then method or catch method after that


Return Promise Then

you can see from the figure above that return is a Promise object.

Menu