The novice rookie asks how to save the value calculated by computed for the first time in vue?

for example, an element-ui el-slider slider calculates the v-model value of the slider through computed, and the return value changes when the slider is dragged. How to save the initial slider"s calculated return value at the left end?

Mar.07,2021

if you want to save the state, use


to put it in data


I feel that this requirement can be realized without computed, according to the traditional way of thinking, event-driven, change the value, record the last value, isn't it good?

Menu