廖井涛
2025-12-02 fd2ec4214c6f8456b957c3545e7d67bcdbbb9985
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import VxeUI from "vxe-pc-ui";
function copyTableCellValue(row, column) {
    if(column.field.indexOf('.')>-1){
        let  array = column.field.split('.')
        if (row[array[0]][array[1]]!==null){
            VxeUI.clipboard.copy(row[array[0]][array[1]])
        }
 
    }else {
        if (row[column.field]!==null){
            VxeUI.clipboard.copy(row[column.field])
        }
 
    }
}
function copyTableCellValueShow(row, column) {
    if(column.field.indexOf('.')>-1){
        let  array = column.field.split('.')
        if (row[array[0]][array[1]+'Show']!==null){
            VxeUI.clipboard.copy(row[array[0]+'Show'][array[1]])
        }
 
    }else {
        if (row[column.field+'Show']!==null){
            VxeUI.clipboard.copy(row[column.field+'Show'])
        }
 
    }
}
 
 
export {copyTableCellValue,copyTableCellValueShow}