Update: 在线版阻止浏览器默认右键菜单
This commit is contained in:
@@ -82,6 +82,7 @@ class App extends Component {
|
|||||||
constructor(element) {
|
constructor(element) {
|
||||||
super();
|
super();
|
||||||
const $content = $(HTMLTemplate.get('html/app.html').render());
|
const $content = $(HTMLTemplate.get('html/app.html').render());
|
||||||
|
$content.on('contextmenu', (e) => e.preventDefault());
|
||||||
this.setContent($content);
|
this.setContent($content);
|
||||||
this.mountOn($(element));
|
this.mountOn($(element));
|
||||||
this.#nav_ = new Nav();
|
this.#nav_ = new Nav();
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ const { PythonShell } = Electron;
|
|||||||
|
|
||||||
Loader.init = () => {
|
Loader.init = () => {
|
||||||
$('body').append(XML.TEMPLATE_STR['INTERFACE']);
|
$('body').append(XML.TEMPLATE_STR['INTERFACE']);
|
||||||
|
$('body').on('contextmenu', (e) => e.preventDefault());
|
||||||
if (goog.isElectron) {
|
if (goog.isElectron) {
|
||||||
PythonShell.init();
|
PythonShell.init();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user