3131 </div >
3232</template >
3333
34- <script setup lang="tsx ">
35- import { ref , onMounted } from ' vue' ;
34+ <script setup lang="ts ">
35+ import { ref , onMounted , h } from ' vue' ;
3636import { Table , Button , Modal , Input , Space } from ' ant-design-vue' ;
3737import useIDBOperations from ' ./useIDBOperations' ;
3838import { User , Location } from ' ./IDBOperations' ;
@@ -62,12 +62,17 @@ const userColumns = [
6262 {
6363 title: ' Action' ,
6464 key: ' action' ,
65- render : (text : any , record : User ) => (
66- <Space size = " middle" >
67- <Button type = ' primary' onClick = { () => handleEditUser (record .name )} >Edit</Button >
68- <Button type = ' primary' onClick = { () => handleDeleteUser (record .name )} >Delete</Button >
69- </Space >
70- ),
65+ render : (text : any , record : User ) =>
66+ h (Space , { size: ' middle' }, [
67+ h (Button , {
68+ type: ' primary' ,
69+ onClick : () => handleEditUser (record .name )
70+ }, ' Edit' ),
71+ h (Button , {
72+ type: ' primary' ,
73+ onClick : () => handleDeleteUser (record .name )
74+ }, ' Delete' )
75+ ])
7176 },
7277];
7378
@@ -78,12 +83,17 @@ const locationColumns = [
7883 {
7984 title: ' Action' ,
8085 key: ' action' ,
81- render : (text : any , record : Location ) => (
82- <Space size = " middle" >
83- <Button type = ' primary' onClick = { () => handleEditLocation (record .id )} >Edit</Button >
84- <Button type = ' primary' onClick = { () => handleDeleteLocation (record .id )} >Delete</Button >
85- </Space >
86- ),
86+ render : (text : any , record : Location ) =>
87+ h (Space , { size: ' middle' }, [
88+ h (Button , {
89+ type: ' primary' ,
90+ onClick : () => handleEditLocation (record .id )
91+ }, ' Edit' ),
92+ h (Button , {
93+ type: ' primary' ,
94+ onClick : () => handleDeleteLocation (record .id )
95+ }, ' Delete' )
96+ ])
8797 },
8898];
8999
0 commit comments