Commit 2789b546 authored by gxkai's avatar gxkai

lint: 调整

parent b88a6fcd
......@@ -8,6 +8,7 @@
"plugins": ["@typescript-eslint", "@nrwl/nx"],
"extends": "standard",
"rules": {
"no-useless-escape": "off"
},
"overrides": [
{
......
......@@ -165,16 +165,16 @@ class App {
registry.put({ api: self._components.filesProviders, name: 'fileproviders' })
migrateFileSystem(self._components.filesProviders.browser)
// 请求token
window.parent.postMessage({event: 'getToken'}, '\*')
window.addEventListener("message", this.handleListenMessage, false)
window.parent.postMessage({ event: 'getToken' }, '\*')
window.addEventListener('message', this.handleListenMessage, false)
}
handleListenMessage(event$){
const {event,data} = event$.data
handleListenMessage (event$) {
const { event, data } = event$.data
if (!event) return
// 接收token
if (event === 'giveToken') {
registry.put({api: data, name: 'baas-token'})
registry.put({ api: data, name: 'baas-token' })
}
// 接收合约zip文件
if (event === 'giveStoreUrl') {
......@@ -183,8 +183,8 @@ class App {
}).then(async _ => {
await resetWorkspaces()
const files = await unZipFile(_.data)
await uploadFile( {files}, '', ()=> {}, )
window.parent.postMessage({event: 'showIframe'}, '\*')
await uploadFile({ files }, '', () => {})
window.parent.postMessage({ event: 'showIframe' }, '\*')
})
}
}
......@@ -509,7 +509,7 @@ class App {
appManager.on('editor', 'editorMounted', () => {
const basePlugins = ['solidity', 'udapp', 'debugger']
if (Array.isArray(workspace)) {
const workspace$ = Array.from(new Set([...workspace, ... basePlugins]))
const workspace$ = Array.from(new Set([...workspace, ...basePlugins]))
appManager.activatePlugin(workspace$).then(async () => {
try {
if (params.deactivate) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment