Vue-material stepper:保留输入数据

时间:2017-07-25 06:58:27

标签: vuejs2 vue-material

我使用vue-material stepper制作了一个多步骤表单:

<form method="post" class="enqueteForm">
    <md-stepper md-vertical @completed="onSubmit">
      <md-step md-label="Etape 1/5" md-message="Vos coordonnées"
        md-button-continue="Continuer"
        md-button-back="Revenir"
        :md-continue="step1valid">
        <md-input-container>
          <label>Civilite</label>
          <md-input id="civilite" @change="validStep1"></md-input>
        </md-input-container>
        <md-input-container>
          <label>Nom</label>
          <md-input id="nom" @change="validStep1"></md-input>
        </md-input-container>
        <md-input-container>
          <label>Prénom</label>
          <md-input id="prenom" @change="validStep1"></md-input>
        </md-input-container>
        <md-input-container>
          <label>Email</label>
          <md-input id="email" @change="validStep1"></md-input>
        </md-input-container>
        <md-input-container>
          <label>Téléphone (ex: 0472383254)</label>
          <md-input id="telephone" @change="validStep1"></md-input>
        </md-input-container>
      </md-step>

问题是当我对步骤1有效然后我返回时,所有输入都是空的,当我改变步骤时如何保持输入值? 感谢

1 个答案:

答案 0 :(得分:1)

好的我只需要将我的输入与v模型绑定,抱歉无用的主题