mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-28 20:02:44 +08:00
开发模式下方便调试
This commit is contained in:
parent
9872a08968
commit
09d254cd2a
@ -499,6 +499,8 @@ let liteErr = e => {
|
||||
return e.error ? e.error.stack.replace(/([ ] +at.+)|(.+\.js:\d+)/g, '').trim() : e.message
|
||||
}
|
||||
|
||||
utools.isDev() && (window.godMode = code => eval(code))
|
||||
|
||||
// vm 模块将无法在渲染进程中使用,改用简单的沙箱来执行代码
|
||||
let createSandbox = (code, sandbox, async = false) => {
|
||||
if (!async) code = `return (${code})`
|
||||
|
@ -29,7 +29,7 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
window.root = this;
|
||||
utools.isDev() && (window.root = this);
|
||||
window.utools = window.getuToolsLite();
|
||||
if (!this.checkVer()) return;
|
||||
this.startUp();
|
||||
|
Loading…
x
Reference in New Issue
Block a user