Article From:

<tbody class=”base_tbody”>
<tr class=”base_tr”>
<td class=”wayBillNum”><input type=”text” placeholder=”Please enter the waybill number “/> < /td>
<td class=”ordersName”><input type=”text” placeholder=”Please enter the name of the goods (supporting fuzzy search), “/> < /td&gt”.
<td class=”ordersType”><input type=”text” v-model=”orderType[orderTypeIndex].typeNameWithCode” readonly @click=”ordersShow”/>

<ul v-show=”ordersTypeShow” class=”chooseOrdersType”>
<li v-for=”(item,index) in orderType” v-html=”item.typeNameWithCode” @click=”changeOrderType(index)” :class=”orderTypeIndex===index?’active’:””></li>
<td class=”ordersNum”><input type=”text” placeholder=”The number of “/> < /td&gt”;
<td class=”spec”><input type=”text” placeholder=”Long “/> < input type=” text “placeholder=” wide “/> < input type=” text “input” high “;”T;
<td class=”volume”><input type=”text” placeholder=”Volume “/> < /td>
<td class=”volumeWeight”><input type=”text” placeholder=”Volume weight “/> < /td>
<td class=”actualWeight”><input type=”text” placeholder=”Actual weight “/> < /td>
<td class=”costWeight”><input type=”text” placeholder=”Billing weight “/> < /td>
<td class=”unitPrice”><input type=”text” placeholder=”Unit price “/> < /td>
<td class=”discount”><input type=”text” placeholder=”Discount “/> < /td>
<td class=”freight”><input type=”text” placeholder=”Freight “/> < /td>
<td class=”remarks”><input type=”text” placeholder=”Note “note” /> < /td>

How do you control data in such a form? Do you use buttons to control the addition of rows on the page? How should V-for data be written? There is also clicking event in the row. Is it invalid in the array?

Answer 0:

1.Suppose your data is called arr:[]
2.When you show it, you use V-for (‘item in arr’)
3.When you add data, add one to arr directly, and the page will automatically display more than one.
4.Click on the event to register on the element you need to register, and do not need to put it in the array.

Answer 1:

It is recommended to write the todoList of Vue

Link of this Article: Vue data processing

Leave a Reply

Your email address will not be published. Required fields are marked *