How to keep one decimal place in js input

problem description

the page retains a decimal place when the requirement is entered, not after the input, but by entering 1, which is displayed directly as 1.0.

the environmental background of the problems and what methods you have tried

I have done the method of limiting one decimal place, but the test shows that it is 1 place when I want to enter it. In the past, when I used to keep the decimal place, it was mostly displayed. When this kind of input is done, I have no idea. Vue and element used in the front-end framework are displayed on Synchronize.

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Mar.29,2021

num.toFixed (1)


/ (^ [1-9]\ d * (\.\ d {1})? $) | (^ 0\.\ d {1} $) | ^ 0$/.test (yourValue)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b387d8-4115b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b387d8-4115b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?