fix: batch upgrader button always disabled

This commit is contained in:
Jacky 2024-10-26 18:27:21 +08:00
parent 0b6149b28f
commit 7ea0aad938
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D

View file

@ -1,6 +1,6 @@
<script setup lang="ts" generic="T=any"> <script setup lang="ts" generic="T=any">
import type { Column } from '@/components/StdDesign/types' import type { Column } from '@/components/StdDesign/types'
import type { ComputedRef, Ref } from 'vue' import type { ComputedRef } from 'vue'
import type { StdTableProps } from './StdTable.vue' import type { StdTableProps } from './StdTable.vue'
import StdBatchEdit from '@/components/StdDesign/StdDataDisplay/StdBatchEdit.vue' import StdBatchEdit from '@/components/StdDesign/StdDataDisplay/StdBatchEdit.vue'
import StdCurdDetail from '@/components/StdDesign/StdDataDisplay/StdCurdDetail.vue' import StdCurdDetail from '@/components/StdDesign/StdDataDisplay/StdCurdDetail.vue'
@ -25,8 +25,13 @@ export interface StdCurdProps<T> extends StdTableProps<T> {
const props = defineProps<StdTableProps<T> & StdCurdProps<T>>() const props = defineProps<StdTableProps<T> & StdCurdProps<T>>()
const selectedRowKeys = ref<(string | number)[]>([]) const selectedRowKeys = defineModel<(number | string)[]>('selectedRowKeys', {
const selectedRows: Ref<T[]> = ref([]) default: () => reactive([]),
})
const selectedRows = defineModel<T[]>('selectedRows', {
default: () => reactive([]),
})
const visible = ref(false) const visible = ref(false)
// eslint-disable-next-line ts/no-explicit-any // eslint-disable-next-line ts/no-explicit-any