Explorar o código

标签管理 标签分类 频道内容管理选择内容bug修复

DESKTOP-O04BTUJ\muzen %!s(int64=3) %!d(string=hai) anos
pai
achega
498d7f82fa
Modificáronse 1 ficheiros con 8 adicións e 3 borrados
  1. 8 3
      src/views/label/tag/detail.vue

+ 8 - 3
src/views/label/tag/detail.vue

@@ -94,7 +94,7 @@
       <!-- 列表 -->
       <el-table :data="dialogData" height="584" v-loading="loading" ref="table" :row-key="getRowKey"
         @selection-change="getChange" lazy>
-        <el-table-column type="selection" align="center" />
+        <el-table-column type="selection" align="center" reserve-selection />
         <el-table-column label="内容ID" prop="id" align="center" />
         <el-table-column label="音频名称" prop="audioName" align="center" />
         <el-table-column label="音频封面" align="center" width="100px">
@@ -332,8 +332,13 @@ export default {
     },
     // 表格多选
     getChange(row) {
-      this.ids = []
-      row.map(i => this.ids.push(i.id))
+      if (row.length > 0) {
+        row.map(i => {
+          if (this.ids.findIndex(j => j === i.id) === -1) {
+            this.ids.push(i.id)
+          }
+        })
+      }
     },
 
     // 添加频道内容