新增 showDevTools

This commit is contained in:
fofolee
2022-04-25 11:22:27 +08:00
parent 219d0146e0
commit 8f2d332cda
4 changed files with 45 additions and 22 deletions

14
plugin/lib/utoolsLite.js Normal file
View File

@@ -0,0 +1,14 @@
const getuToolsLite = () => {
var utoolsLite = Object.assign({}, _.cloneDeep(utools))
// if (utools.isDev()) return utoolsLite
const dbBlackList = ['db', 'dbStorage', 'removeFeature', 'setFeature', 'onDbPull']
const payBlackList = ['fetchUserServerTemporaryToken', 'getUserServerTemporaryToken', 'openPayment', 'fetchUserPayments']
const etcBlackList = ['onPluginEnter', 'onPluginOut', 'createBrowserWindow']
_.concat(dbBlackList, payBlackList, etcBlackList).forEach(item => {
delete utoolsLite[item]
})
Object.freeze(utoolsLite)
return utoolsLite
}
module.exports = getuToolsLite