Browse Source

静态信息添加段落添加到对应位置

zhouna 6 years ago
parent
commit
d574079eff
1 changed files with 9 additions and 2 deletions
  1. 9 2
      src/components/icss/AddMedicinePrompt.vue

+ 9 - 2
src/components/icss/AddMedicinePrompt.vue

@@ -121,13 +121,20 @@
     },
     methods: {
       addParagraph(i){
-        this.form.prags.push({
+        this.form.prags.splice(i+1,0,{
           title:'',
           content:'',
           isReason:0,
-          orderNo:this.form.prags.length,
+          orderNo:i+1,
           position:[],
           text:''});
+        /*this.form.prags.push({
+          title:'',
+          content:'',
+          isReason:0,
+          orderNo:this.form.prags.length,
+          position:[],
+          text:''});*/
       },
       delParagraph(i){
         if(this.form.prags.length==1){