lex-xin 3 سال پیش
والد
کامیت
6cdacdbd6e
1فایلهای تغییر یافته به همراه18 افزوده شده و 0 حذف شده
  1. 18 0
      src/views/audition/ArrangeWork.vue

+ 18 - 0
src/views/audition/ArrangeWork.vue

@@ -49,6 +49,13 @@
             </template>
             <span v-else style="color: #808080;">请选择</span>
           </template>
+          <template #right-icon>
+            <span v-if="music.name" @click.stop="delAccompany(item.musicScoreIdList, index)" style="color: #999999; font-size: .12rem; padding-left: .12rem"><van-icon size="14" name="delete-o" />删除</span>
+          </template>
+          <template #extra>
+            <!-- <span><van-icon name="delete-o" />删除</span> -->
+            <span style="height: 24px;font-size: 16px;line-height: 24px;color: #DADADA !important;"><van-icon name="arrow" /></span>
+          </template>
         </van-cell>
         <div class="addAccompaniment" v-if="item.musicScoreIdList.length < 3" @click="addCloud(item)">
           <van-icon name="plus" size="16px" />增加云教练训练曲目
@@ -222,6 +229,17 @@ export default {
       this.tabActiveList = item
       this.tabActiveIndex = index
     },
+    delAccompany(music, index) {
+      if(music.length == 1) {
+        music[0] = {
+          id: null,
+          name: null,
+        }
+        this.$forceUpdate()
+      } else {
+        music.splice(index, 1)
+      }
+    },
     addCloud(item) {
       if(item.musicScoreIdList.length < 3) {
         item.musicScoreIdList.push('')