Skip to content

Commit 5369cbb

Browse files
committed
fix: Resource authorization: "Select All" is ineffective
1 parent 22f72c5 commit 5369cbb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ui/src/views/system/resource-authorization/component/PermissionTable.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@
5656
class="mt-16"
5757
:data="filteredData"
5858
@select="select"
59+
@select-all="selectAll"
5960
:maxTableHeight="260"
6061
:row-key="(row: any) => row.id"
6162
style="min-width: 600px"
6263
:expand-row-keys="defaultExpandKeys"
6364
show-overflow-tooltip
6465
>
65-
<el-table-column type="selection" width="55" :reserve-selection="true" />
66+
<el-table-column type="selection" width="55" :reserve-selection="true"> </el-table-column>
6667
<el-table-column prop="name" :label="$t('common.name')">
6768
<template #default="{ row }">
6869
<span style="vertical-align: sub">
@@ -137,7 +138,7 @@
137138
</div>
138139
</template>
139140
<script setup lang="ts">
140-
import { ref, onMounted, watch, computed, reactive } from 'vue'
141+
import { ref, onMounted, computed, nextTick } from 'vue'
141142
import { useRoute } from 'vue-router'
142143
import type { Provider } from '@/api/type/model'
143144
import { SourceTypeEnum } from '@/enums/common'
@@ -312,6 +313,9 @@ const filteredData = computed(() => {
312313
313314
const multipleSelection = ref<any[]>([])
314315
const selectObj: any = {}
316+
const selectAll = (selection: any[]) => {
317+
multipleSelection.value = selection
318+
}
315319
const select = (val: any[], active: any) => {
316320
if (active.resource_type === 'folder') {
317321
if (!val.some((item) => item.id == active.id)) {

0 commit comments

Comments
 (0)