Explorar o código

fix:修复对话框筛选受selectionAll影响导致失效的问题

liujiayin %!s(int64=2) %!d(string=hai) anos
pai
achega
5e3f2efd13
Modificáronse 1 ficheiros con 11 adicións e 8 borrados
  1. 11 8
      src/components/ibps-crud/mixin/base.js

+ 11 - 8
src/components/ibps-crud/mixin/base.js

@@ -97,12 +97,12 @@ export default {
             default: 'checkbox'
         },
         /**
-     * @description 所有列表已选择的数据id
-     *
-     */
-        selection_all: {
-            type: Array,
-            default: () => []
+         * @description 所有列表已选择的数据id
+         *
+         */
+        selectionAll: {
+            type: Object,
+            default: null
         }
     },
     methods: {
@@ -271,8 +271,11 @@ export default {
             const buttonKey = action.key
             let selection = null// 选中数据
             if (position === 'toolbar') { // 工具栏
-                // selection = this.getSelectedIds()
-                selection = this.selection_all.map(i => i.id_) // 默认给所有已选择的数据id
+                if (this.selectionAll) {
+                    selection = this.selectionAll.map(i => i.id_) // 默认给所有已选择的数据id
+                } else {
+                    selection = this.getSelectedIds()
+                }
             } else { // 管理列
                 selection = data ? this.getPkValue(data) : null
             }