mirror of
https://github.com/dataease/dataease.git
synced 2026-05-20 11:38:11 +08:00
fix(图表): 修复表格选中单个单元格复制错误 #15836
This commit is contained in:
@@ -1077,7 +1077,14 @@ export function copyContent(s2Instance: SpreadSheet, event, fieldMeta) {
|
||||
if (cells.length === 1) {
|
||||
const curCell = cells[0]
|
||||
if (cell.getMeta().id === curCell.id) {
|
||||
copyString(cellMeta.value + '', true)
|
||||
const cellMeta = cell.getMeta()
|
||||
const value = cellMeta.data?.[cellMeta.valueField]
|
||||
const metaObj = find(fieldMeta, m => m.field === cellMeta.valueField)
|
||||
let fieldVal = value?.toString()
|
||||
if (metaObj) {
|
||||
fieldVal = metaObj.formatter(value)
|
||||
}
|
||||
copyString(fieldVal, true)
|
||||
}
|
||||
s2Instance.interaction.clearState()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user