When JavaScript performs calculations with decimals, a loop of 9 will appear. The following method can help solve it.
The first parameter is the value to be processed, and the second parameter is the number of decimal places to be retained. This is how I use it in my own project~