Merge pull request #8207 from dataease/pr@dev@feat_echarts_table_copy_to_clipboard

feat(视图): ECharts 表格右键复制指定单元格内容
This commit is contained in:
wisonic-s 2024-02-28 12:37:36 +08:00 committed by GitHub
commit 2a5a324ef4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,6 +37,8 @@
:index-config="{seqMethod}"
:show-header="showHeader"
@cell-click="cellClick"
@row-contextmenu="(_, __, e) => cellRightClick(e)"
@header-contextmenu="(_, e) => cellRightClick(e)"
>
<ux-table-column
type="index"
@ -654,6 +656,12 @@ export default {
}
this.antVActionPost(dimensionList, nameIdMap[col.property] || 'null', position)
},
cellRightClick(event) {
if (event.target?.innerText) {
navigator.clipboard.writeText(event.target.innerText)
}
event.preventDefault()
},
antVActionPost(dimensionList, name, param) {
this.pointParam = {
data: {