/**
 * 双击复制
 * 适用与element表单
 */
import { ElMessage } from 'element-plus'
 
const tableCelldbl = (row, column, cell, event) => {
    if (!column.property) return
    if (!row[column.property]) return
    const oInput = document.createElement('input')
    oInput.value = row[column.property]
    document.body.appendChild(oInput)
    oInput.select()
    document.execCommand('Copy')
    ElMessage({
        message: '复制成功',
        type: 'success',
    })
    oInput.remove()
}

export default tableCelldbl;