Преглед изворни кода

fix:调整列表按钮传参逻辑

liujiayin пре 2 година
родитељ
комит
ce0434445a
1 измењених фајлова са 5 додато и 3 уклоњено
  1. 5 3
      src/components/ibps-crud/mixin/base.js

+ 5 - 3
src/components/ibps-crud/mixin/base.js

@@ -280,9 +280,11 @@ export default {
             } else { // 管理列
             } else { // 管理列
                 selection = data ? this.getPkValue(data) : null
                 selection = data ? this.getPkValue(data) : null
             }
             }
-            this.$emit('action-event', buttonKey, position, selection, this.selectionAll, index, action)
-            // this.$emit('action-event', buttonKey, position, selection, data, index, action)
-
+            if(this.$utils.isArray(data)){
+                this.$emit('action-event', buttonKey, position, selection, this.selectionAll, index, action)
+            }else{
+                this.$emit('action-event', buttonKey, position, selection, data, index, action)
+            }
         },
         },
 
 
         /**
         /**