Error in mounted hook: “Error: please transfer a valid prop

created at 09-13-2021 views: 3

I encountered such an error when writing the form_item loop today and recorded it.

Then we need to use the form loop,
I wrote it directly in the form_item at the beginning, but when I reset the form, I found that it could not be reset. Then I added a layer of form-item to the el-input. I also checked the related errors on the Internet and found that they were all: prop=" 'item.'+index+'.index2'" and so on, but it didn't solve my problem. The error still persists, and the form cannot be reset at the same time.

Consider slowly at this time. In fact, it is an array loop. Then we will get the accurate value to eliminate this error.

        v-for="(order_award, index) in form.award_config.order_award
        style="margin-bottom: 0"
          <el-row :gutter="12" type="flex">
            <el-col :span="4" v-if="!(form.award_config.award_type == 1)">
              <el-form-item label-width="0" :prop="'award_config.order_award.order_award_list['+index+'].order_count'">
                <el-card shadow="never" class="reward_content_card">
                  style="margin-right: 5px; font-size: 14px"
                ><br />
                <span class="input_unit"></span>
                  class="reward_content_padding reward_content_input"
                <div class="input_unit"></div>

Mainly this piece of code


Get to the detailed location to solve the error.

created at:09-13-2021
edited at: 09-13-2021: