Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
374 views
in Technique[技术] by (71.8m points)

vue.js - Keep alive in componentes Nuxt

I have an application with Nuxt / ElementUI. I have 4 components in a Stepper and when advancing in the stepper, the values of the components that were left behind are lost. I have tried occupying keep-alive in Nuxt and NuxtChild but it doesn't work and I don't want to have to resort to persisting data in localStorage or Vuex. Could you help me and tell me how I keep the data in the components with keep -alive?

<div>
    <div v-if="active == 0">
        <ingresar-informacion-general></ingresar-informacion-general>
    </div>
    <div v-if="active == 1">
        <ingresar-proveedor></ingresar-proveedor>
    </div>
    <div v-if="active == 2">
        <ingresar-condiciones></ingresar-condiciones>
    </div>
</div>

<el-steps :active="active" finish-status="success" simple>
    <el-step title="Informacion General"></el-step>
    <el-step title="Proveedor"></el-step>
    <el-step title="Condiciones"></el-step>
</el-steps>

Thank you !!!!

question from:https://stackoverflow.com/questions/65852676/keep-alive-in-componentes-nuxt

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...