Binding problem of v-model of el-radio in v-for

Bind an el-radio-group in

v-for.

<div class="studentLi" v-for="(item,index) in students" :key="index">
   <div class="operationMsg">
     <ul>
       <li>
        <div>
          <el-radio-group @change="console1" v-model="item.studyStatus">
              <el-radio label="1"></el-radio>
              <el-radio label="2"></el-radio>
              <el-radio label="3"></el-radio>
              <el-radio label="4"></el-radio>
          </el-radio-group>
        </div>
       <div>
       </div>
      </li>
     </ul>
   </div>
</div>

has also tried to use vmurmodelling "students [index] .studyStatus", even if you click console1.
ask how to bind here.

The

studyStatus attribute I added in the mounted traversal.

solved:
because the students is passed from the front, I can just add attributes in the previous iteration, which seems to be a matter of order.
go back and relearn the vue life cycle

Jul.05,2022

label to be consistent with item.studyStatus click change item.studyStatus automatically select the corresponding value


binding on the code is no problem, console1 will also be executed, you type log out there must be something, but what actions do you want to perform? Do you want to get the currently changed value in console1 ?


solved. Before, the studyStatus attribute was traversed in the mounted, but now I have changed it, because the students is passed from the front. I can just add the attribute in the previous traversal, which seems to be a matter of order.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7afe64-8009.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7afe64-8009.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?