Skip to content

Commit 7ea0aad

Browse files
committed
fix: batch upgrader button always disabled
1 parent 0b6149b commit 7ea0aad

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

app/src/components/StdDesign/StdDataDisplay/StdCurd.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts" generic="T=any">
22
import type { Column } from '@/components/StdDesign/types'
3-
import type { ComputedRef, Ref } from 'vue'
3+
import type { ComputedRef } from 'vue'
44
import type { StdTableProps } from './StdTable.vue'
55
import StdBatchEdit from '@/components/StdDesign/StdDataDisplay/StdBatchEdit.vue'
66
import StdCurdDetail from '@/components/StdDesign/StdDataDisplay/StdCurdDetail.vue'
@@ -25,8 +25,13 @@ export interface StdCurdProps<T> extends StdTableProps<T> {
2525
2626
const props = defineProps<StdTableProps<T> & StdCurdProps<T>>()
2727
28-
const selectedRowKeys = ref<(string | number)[]>([])
29-
const selectedRows: Ref<T[]> = ref([])
28+
const selectedRowKeys = defineModel<(number | string)[]>('selectedRowKeys', {
29+
default: () => reactive([]),
30+
})
31+
32+
const selectedRows = defineModel<T[]>('selectedRows', {
33+
default: () => reactive([]),
34+
})
3035
3136
const visible = ref(false)
3237
// eslint-disable-next-line ts/no-explicit-any

0 commit comments

Comments
 (0)