fix: 修复Table插槽传参错误

This commit is contained in:
kailong321200875
2023-08-11 17:48:50 +08:00
parent dce76f042d
commit 97344e68f5
10 changed files with 29 additions and 29 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>