Commit 44bda148 authored by lshan's avatar lshan

批量添加从尾部添加新question

parent 50fa793d
......@@ -18,7 +18,7 @@
<span v-for="(item,index) of forms" :key="index" classs="">
<!-- <span v-if="index%2!==0" > -->
<a-input v-model="item.answer" :placeholder="'设置自动回复'+ index +'(50字以内)'" style="width: 18rem;margin-right:10px;"/>
<span @click="addInput(index)">
<span @click="addInput()">
<a-icon type="plus" style=" margin-right:10px;" />
</span>
<span @click="minInput(index)" v-if="index!=0">
......@@ -174,7 +174,6 @@ export default Vue.extend({
total:0,
PAGE_SIZE,
loading:false,
index:0
}
},
methods:{
......@@ -200,14 +199,14 @@ export default Vue.extend({
this.searchPageReqParams.endTime = undefined
this.fetchList()
},
addInput(index:number){
addInput(){
let newList = {
answer:'',
question:''
}
if(this.forms.length<5){
// this.forms.push(newList)
this.forms.splice(index+1,0,newList)
this.forms.push(newList)
// this.forms.splice(index+1,0,newList)
}
},
minInput(index:number){
......@@ -329,4 +328,3 @@ export default Vue.extend({
// }
})
</script>
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