Commit c57cdded authored by 黄奎's avatar 黄奎

页面修改

parent 495da70e
......@@ -84,13 +84,13 @@ export function CreateQuestion(questionKey) {
Name: "A",
Content: ""
}];
var array2 = [{
var array3 = [{
Name: "1",
Content: "A"
}];
AnswerList.push(array1);
AnswerList.push(array2);
AnswerList.push(array2);
AnswerList.push(array3);
break;
//排序题
case "sorting-problem":
......
<!--连线题-->
<style>
.matchingQuestion{
width:100%;
.matchingQuestion {
width: 100%;
}
.team_tit {
display:inline-block;
display: inline-block;
font-size: 14px;
color: #A8A8B3;
padding-bottom: 20px;
margin-left:13px;
margin-left: 13px;
}
.line_center{
.line_center {
display: inline-block;
width: 28px;
height: 10px;
border-top: 1px solid #E1E1E5;
margin: 13px 12px 0 0;
}
.selectBox2 {
display: inline-block;
vertical-align: top;
......@@ -33,6 +36,7 @@
color: #181E33;
outline: none;
}
</style>
<template>
<div class="matchingQuestion">
......@@ -48,7 +52,6 @@
</td>
<td style="width:40px;text-align:center;">
<i class="iconfont icon-guanbi Tiku_DelIcon" @click="deleteOpion(0,index)"></i>
<!-- <a style="cursor:pointer;" @click="deleteOpion(0,index)">删除</a> -->
</td>
</tr>
<tfoot>
......@@ -78,7 +81,7 @@
<tfoot>
<tr>
<td colspan="3">
<a class="addTiMuList" style="margin-left:13px;" @click="addOption(0)">
<a class="addTiMuList" style="margin-left:13px;" @click="addOption(1)">
<i class="iconfont icon-add"></i>添加更多
</a>
</td>
......@@ -87,7 +90,7 @@
</table>
<span class="team_tit">答案</span>
<table v-if="data&&data.length>2" style="padding-left:13px;">
<tr v-for="(item,index) in data[2]">
<tr v-for="(item,index) in data[0]">
<td style="width:30px;">
{{item.Name}}
</td>
......@@ -95,7 +98,7 @@
<span class="line_center"></span>
</td>
<td>
<select v-model="item.Content" class="selectBox2">
<select v-model="data[2][index].Content" class="selectBox2">
<template v-for="(cItem,cIndex) in data[1]">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Name">
</option>
......@@ -128,8 +131,8 @@
initialFrameHeight: 80,
},
optionTitleList: [],
commonIndex:-1,
commonIndex2:-1
commonIndex: -1,
commonIndex2: -1
};
},
computed: {
......@@ -144,6 +147,10 @@
},
//删除选项
deleteOpion(index, subIndex) {
//删除第一组是,也删除答案里面的
if (index == 0) {
this.data[2].splice(subIndex, 1);
}
this.data[index].splice(subIndex, 1);
this.calcOptionTitle();
},
......@@ -180,18 +187,18 @@
this.$emit('getChild', this.data);
},
//点击切换输入
changeEdit(index){
this.commonIndex=index;
this.commonIndex2=-1;
changeEdit(index) {
this.commonIndex = index;
this.commonIndex2 = -1;
},
changeEdit2(index){
this.commonIndex2=index;
this.commonIndex=-1;
changeEdit2(index) {
this.commonIndex2 = index;
this.commonIndex = -1;
}
},
mounted() {
console.log(this.data,'data');
},
console.log(this.data, 'data');
},
watch: {
data: {
handler(newValue) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment