|
@@ -119,6 +119,11 @@
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="option-actions">
|
|
<div class="option-actions">
|
|
|
|
|
+ <el-switch
|
|
|
|
|
+ v-model="answer.options[optionIndex].open"
|
|
|
|
|
+ active-color="#13ce66"
|
|
|
|
|
+ inactive-color="#ff4949">
|
|
|
|
|
+ </el-switch>
|
|
|
<el-button
|
|
<el-button
|
|
|
v-if="optionIndex + 1 === answer.options.length"
|
|
v-if="optionIndex + 1 === answer.options.length"
|
|
|
type="primary"
|
|
type="primary"
|
|
@@ -215,7 +220,7 @@ export default {
|
|
|
answers: [
|
|
answers: [
|
|
|
{
|
|
{
|
|
|
title: '',
|
|
title: '',
|
|
|
- options: [{name:'',value:0}]
|
|
|
|
|
|
|
+ options: [{name:'',value:0,open:false}]
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
@@ -239,7 +244,7 @@ export default {
|
|
|
addItem(length) {
|
|
addItem(length) {
|
|
|
this.form.answers.push({
|
|
this.form.answers.push({
|
|
|
title: '',
|
|
title: '',
|
|
|
- options: [{name:'',value:0}]
|
|
|
|
|
|
|
+ options: [{name:'',value:0,open:false}]
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
delItem(item, index) {
|
|
delItem(item, index) {
|
|
@@ -354,7 +359,7 @@ export default {
|
|
|
this.form = {
|
|
this.form = {
|
|
|
answers: [{
|
|
answers: [{
|
|
|
title: '',
|
|
title: '',
|
|
|
- options: [{name:'',value:0}]
|
|
|
|
|
|
|
+ options: [{name:'',value:0,open:false}]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
]
|
|
]
|
|
@@ -371,7 +376,7 @@ export default {
|
|
|
this.form = {
|
|
this.form = {
|
|
|
answers: [{
|
|
answers: [{
|
|
|
title: '',
|
|
title: '',
|
|
|
- options: [{name:'',value:0}]
|
|
|
|
|
|
|
+ options: [{name:'',value:0,open:false}]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
]
|
|
]
|