0👍
The problem:
precedente()
is a method, but you are changing it to a variable and setting it as null
in two places, which is breaking the code that then tries to call it as a method.
- Inside the
precedente()
method withthis.precedente = this.numCorrente;
- Inside
uguale()
method withthis.precedente = null;
To fix:
Change the name of the variable wherever you use this.precedente
(without the two ()
brackets) to a different name.
For example, change it to precedenteNum
:
precedente() {
this.precedenteNum = this.numCorrente; // changed | cambiato
this.cliccato = true;
},
uguale() {
if (this.operazione) {
this.numCorrente = `${this.operazione} = ${this.numCorrente}`;
this.operazione = '';
} else {
this.numCorrente = `${this.operatore(
parseFloat(this.precedenteNum), // changed | cambiato
parseFloat(this.numCorrente)
)}`;
}
this.precedenteNum = null; // changed | cambiato
},
- [Vuejs]-How to show date in 13-digit Unix Timestamp format in JSpreadSheet?
- [Vuejs]-Official docs of design components tags for vuejs is needed please
Source:stackexchange.com