問題:選擇case Input 會(huì)聯(lián)動(dòng)顯示,case只是一個(gè)屬性名,選擇case1后應(yīng)該在選擇條件下方出現(xiàn)值為“測(cè)試用例1”和“測(cè)試用例2”的兩個(gè)input,并且可以自定義添加多個(gè)“測(cè)試用例”(就是input輸入框),目前聯(lián)動(dòng)顯示已經(jīng)實(shí)現(xiàn),但是卡在了提交數(shù)據(jù)這一塊,最后數(shù)據(jù)需要保存為和原來的格式一致,,我該怎么動(dòng)態(tài)綁定input的model數(shù)據(jù)結(jié)構(gòu)如下:{"Main":[{"name":"case1","array":[{"name":"測(cè)試用例1","value":1},{"name":"測(cè)試用例2","value":2}]},{"name":"case2","array":[{"name":"測(cè)試用例1","value":1},{"name":"測(cè)試用例2","value":2}]}]} <Radio-Group v-model="RadioCaseSelect" type="button"> <Radio :label="item.name" v-for="item in objectData.Main">{{ item.name }}</i-Radio> </Radio-Group> <div class="layout-form-card" v-for="(item,index) in branchArray"> <Input placeholder="請(qǐng)輸入..." :value="item.name"></Input> </div>
vueJs如何動(dòng)態(tài)生產(chǎn)v-model
FFIVE
2018-12-19 18:13:09