mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
feat: chat table support copy value via right click
This commit is contained in:
@@ -107,8 +107,13 @@ function copyData(event: any, s2?: TableSheet) {
|
||||
} else if (cells.length == 1) {
|
||||
const c = cells[0]
|
||||
const cellMeta = s2.facet.getCellMeta(c.rowIndex, c.colIndex)
|
||||
console.log(cellMeta)
|
||||
if (cellMeta) {
|
||||
copyToClipboard(cellMeta.fieldValue as string).finally(() => {
|
||||
let value = cellMeta.value as string
|
||||
if (value === null || value === undefined) {
|
||||
value = ''
|
||||
}
|
||||
copyToClipboard(value).finally(() => {
|
||||
ElMessage.success(t('qa.copied'))
|
||||
console.debug('copied:', cellMeta.fieldValue)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user