fix: 修复Table插槽传参错误
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="tsx">
|
||||
import { ContentWrap } from '@/components/ContentWrap'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { Table, TableColumn, TableSlotDefault } from '@/components/Table'
|
||||
import { Table, TableColumn } from '@/components/Table'
|
||||
import { getTableListApi } from '@/api/table'
|
||||
import { TableData } from '@/api/table/types'
|
||||
import { ref, h } from 'vue'
|
||||
@@ -87,7 +87,7 @@ const getTableList = async (params?: Params) => {
|
||||
|
||||
getTableList()
|
||||
|
||||
const actionFn = (data: TableSlotDefault) => {
|
||||
const actionFn = (data: any) => {
|
||||
console.log(data)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="tsx">
|
||||
import { ContentWrap } from '@/components/ContentWrap'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { Table, TableColumn, TableSlotDefault } from '@/components/Table'
|
||||
import { Table, TableColumn } from '@/components/Table'
|
||||
import { getTreeTableListApi } from '@/api/table'
|
||||
import { reactive, unref } from 'vue'
|
||||
import { ElTag, ElButton } from 'element-plus'
|
||||
@@ -86,7 +86,7 @@ const columns = reactive<TableColumn[]>([
|
||||
}
|
||||
])
|
||||
|
||||
const actionFn = (data: TableSlotDefault) => {
|
||||
const actionFn = (data) => {
|
||||
console.log(data)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -30,8 +30,8 @@ const columns = reactive<TableColumn[]>([
|
||||
field: 'expand',
|
||||
type: 'expand',
|
||||
slots: {
|
||||
default: (data: TableSlotDefault[]) => {
|
||||
const { row } = data[0]
|
||||
default: (data: TableSlotDefault) => {
|
||||
const { row } = data
|
||||
return (
|
||||
<div class="ml-30px">
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user