Commit 7864312c authored by 何虹's avatar 何虹 💬

挂在到this

parent ce906c7e
...@@ -40,16 +40,16 @@ class HttpClient { ...@@ -40,16 +40,16 @@ class HttpClient {
const webChartConfig = new _packages_modules_webChartConfig__WEBPACK_IMPORTED_MODULE_2__.default(root) const webChartConfig = new _packages_modules_webChartConfig__WEBPACK_IMPORTED_MODULE_2__.default(root)
const ref = new _packages_modules_ref__WEBPACK_IMPORTED_MODULE_6__.default(root) const ref = new _packages_modules_ref__WEBPACK_IMPORTED_MODULE_6__.default(root)
const list = [webQueryClient, billflow, system, webChartConfig, restful, ref] const list = [webQueryClient, billflow, system, webChartConfig, restful, ref]
const api = { // const api = {
} // }
list.forEach(item => { list.forEach(item => {
api[item.moduleName] = item this[item.moduleName] = item
}) })
const root_prototype = root.__proto__ const root_prototype = root.__proto__
const root_prototype_keys = Object.getOwnPropertyNames(root_prototype) const root_prototype_keys = Object.getOwnPropertyNames(root_prototype)
root_prototype_keys.forEach(k => { root_prototype_keys.forEach(k => {
if (k !== 'constructor') { if (k !== 'constructor') {
api[`${k}`] = root_prototype[k] this[`${k}`] = root_prototype[k]
} }
}) })
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -16,16 +16,16 @@ class HttpClient { ...@@ -16,16 +16,16 @@ class HttpClient {
const webChartConfig = new WebChartConfig(root) const webChartConfig = new WebChartConfig(root)
const ref = new Ref(root) const ref = new Ref(root)
const list = [webQueryClient, billflow, system, webChartConfig, restful, ref] const list = [webQueryClient, billflow, system, webChartConfig, restful, ref]
const api = { // const api = {
} // }
list.forEach(item => { list.forEach(item => {
api[item.moduleName] = item this[item.moduleName] = item
}) })
const root_prototype = root.__proto__ const root_prototype = root.__proto__
const root_prototype_keys = Object.getOwnPropertyNames(root_prototype) const root_prototype_keys = Object.getOwnPropertyNames(root_prototype)
root_prototype_keys.forEach(k => { root_prototype_keys.forEach(k => {
if (k !== 'constructor') { if (k !== 'constructor') {
api[`${k}`] = root_prototype[k] this[`${k}`] = root_prototype[k]
} }
}) })
} }
......
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