mirror of
https://github.com/dataease/dataease.git
synced 2026-06-17 04:51:43 +08:00
refactor(图表): 屏蔽表格右键默认菜单
This commit is contained in:
@@ -377,6 +377,12 @@ export class TableInfo extends S2ChartView<TableSheet> {
|
||||
newChart.on(S2Event.GLOBAL_CONTEXT_MENU, event => copyContent(newChart, event, meta))
|
||||
// touch
|
||||
this.configTouchEvent(newChart, drawOption, meta)
|
||||
// right click
|
||||
newChart.once(S2Event.LAYOUT_AFTER_RENDER, () => {
|
||||
newChart.getCanvasElement().addEventListener('contextmenu', e => {
|
||||
e.preventDefault()
|
||||
})
|
||||
})
|
||||
// theme
|
||||
const customTheme = this.configTheme(chart)
|
||||
newChart.setThemeCfg({ theme: customTheme })
|
||||
|
||||
@@ -281,6 +281,12 @@ export class TableNormal extends S2ChartView<TableSheet> {
|
||||
newChart.on(S2Event.GLOBAL_CONTEXT_MENU, event => copyContent(newChart, event, meta))
|
||||
// touch
|
||||
this.configTouchEvent(newChart, drawOption, meta)
|
||||
// right click
|
||||
newChart.once(S2Event.LAYOUT_AFTER_RENDER, () => {
|
||||
newChart.getCanvasElement().addEventListener('contextmenu', e => {
|
||||
e.preventDefault()
|
||||
})
|
||||
})
|
||||
// theme
|
||||
const customTheme = this.configTheme(chart)
|
||||
newChart.setThemeCfg({ theme: customTheme })
|
||||
|
||||
Reference in New Issue
Block a user