Refused to execute inline event handler because it violates the following Content Security Policy directive: “script-src ‘self'”. Either the ‘unsafe-inline’ keyword, a hash (‘sha256-…’), or a nonce (‘nonce-…’) is required to enable inline execution.

背景: 在electron项目的index.html文件中,通过 onclick 属性给组件设置一个点击事件时 …