|
@@ -32,20 +32,23 @@ const useTableCheck = <T extends TableDataType<InputDataType>>(data: T, auto = t
|
|
|
|
|
|
const tableData = computed(() => {
|
|
|
const d = unref(data)
|
|
|
- let result: RowType<T>[] = []
|
|
|
+ // let result: RowType<T>[] = []
|
|
|
+ let result: any[] = []
|
|
|
if (d) {
|
|
|
if (isMultipleData(d)) {
|
|
|
- result = d?.result?.map((d, index) => ({ ...d, index: d.index ?? index })) as RowType<T>[]
|
|
|
+ result = d?.result?.map((d, index) => ({ ...d, index: d.index ?? index }))
|
|
|
} else {
|
|
|
- result = d?.map((d, index) => ({ ...d, index: d.index ?? index })) as RowType<T>[]
|
|
|
+ result = d?.map((d, index) => ({ ...d, index: d.index ?? index }))
|
|
|
}
|
|
|
}
|
|
|
return result
|
|
|
})
|
|
|
|
|
|
- const current = ref<RowType<T>>()
|
|
|
+ // const current = ref<RowType<T>>()
|
|
|
+ const current = ref<any>()
|
|
|
|
|
|
- const currentView = ref<RowType<T>>()
|
|
|
+ // const currentView = ref<RowType<T>>()
|
|
|
+ const currentView = ref<any>()
|
|
|
|
|
|
const visibleHistory = ref<boolean>(false)
|
|
|
|
|
@@ -64,12 +67,14 @@ const useTableCheck = <T extends TableDataType<InputDataType>>(data: T, auto = t
|
|
|
)
|
|
|
|
|
|
/** 表格选中 */
|
|
|
- const onCurrentChange = (row: RowType<T>) => {
|
|
|
+ // const onCurrentChange = (row: RowType<T>) => {
|
|
|
+ const onCurrentChange = (row: any) => {
|
|
|
current.value = row
|
|
|
}
|
|
|
|
|
|
/** 表格行双击 */
|
|
|
- const onDbClick = (row: RowType<T>) => {
|
|
|
+ // const onDbClick = (row: RowType<T>) => {
|
|
|
+ const onDbClick = (row: any) => {
|
|
|
currentView.value = row
|
|
|
visibleHistory.value = true
|
|
|
}
|