current position:Home>How to generate Vue number automatically

How to generate Vue number automatically

2022-02-03 01:25:11 CSDN Q & A

vue The project number is automatically generated according to the city and county , Every new form , Automatic numbering 1, What method should be used

img

img




Refer to the answer 1:

A variable Add one for each addition




Refer to the answer 2:



Refer to the answer 3:

It is recommended that the self incrementing type number be returned to the front end after being generated by the server .
If the front-end generation is necessary , Let the server provide an interface to query the single number of currently saved tables , Take the number from the front to the back , Add 1, Then splice it .
If there is no server support, you have to save the variables localStorage in , But you can't Manual cleaning localStorage and Replace the computer .




Refer to the answer 4:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202030125097864.html

Random recommended