Hello, seniors:
I Xiaobai, in the process of developing the test paper module, the test paper editing page has been written, and Vue is used to achieve two-way data binding.
now we need to develop a test paper preview module, how to achieve the reuse of a lot of written code (as follows)?
take a look at how to achieve HTML reuse , the implementation of this post seems to be a static page, I do not know how to achieve Vue data rendering?
I hope to give some advice to my seniors
<!-- -->
<div v-for = "(item, index) in questions">
<!-- title -->
<div>
<label>{{index + 1}}</label>
<span>. :</span>
<select :id = ""questionType"+index" @change = "changeQuestionType(index)" v-model = "item.questionType">
<option value = "1"></option>
<option value = "2"></option>
<option value = "3"></option>
<option value = "4"></option>
<option value = "5"></option>
<option value = "6"></option>
<option value = "7"></option>
<option value = "8" v-show = "item.parentId == null || item.parentId == -1"></option>
</select>
<input v-model="item.score" type="number">
<span></span>
<button v-on:click = "saveQuestion(index)">
</button>
<button @click = "deleteQuestion(item.questionId)">
</button>
</div>
<!-- -->
<div :id = ""stem"+index">
</div>
</div>