You can use a state management to best save your values and manage how they are save in the local storage.
In vue, the most popular one is vuex
. you can see it's documentation here.
You can also read about how to later on connect vuex and local storage here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…