issues Search Results · repo:ecomfe/uioc language:JavaScript
Filter by
27 results
(87 ms)27 results
inecomfe/uioc (press backspace or delete to remove)目前uioc是基于object的拦截,在组件实例化后对实例上的方法拦截,那么在构造函数中,如果有arrow函数调用,这个this是原有的object,而不是拦截后的object,造成混乱,如下NodeJS代码:by @otakustay
class Foo {
constructor(context) {
this.print = () = console.log(this.x); ...
Exodia
- Opened on Jan 11, 2017
- #69
uioc一直没增加这个接口支持的原因是只要有一个组件模块是异步加载的,那么获取该组件或者有对该组件依赖的组件就会出现非预期情况。
同步接口的初步想法是递归检测该组件以及依赖的组件模块是否已经加载,有任一未加载则抛异常,否则正常返回组件。
help wanted
Exodia
- 2
- Opened on Nov 2, 2016
- #68
现在的情况:
// module.js
export default class DefaultClass {};
export class Class1 {}
export class Class2 {}
// ioc.js
ioc.addComponent( component , {module: module });
以上情况通过配置module关键字获取component时,获取到的仅仅是DefaultClass实例,想要配置获取Class1和Class2目前简单的方式得通过es6 ...
Exodia
- Opened on Oct 31, 2016
- #67
1. 对外不暴露default export, 全部以named的形式暴露。
del 2. setLoaderFunction改名为setProvider,参数和返回值暂时不变,兼容SystemJS环境。 /del
2. 移除getComponentConfig方法。
3. 获取未注册组件时返回rejected promise
4. 注册组件同名时抛异常
...
Exodia
- Opened on Jun 6, 2016
- #56
目前设计的配置语法如下:
let log = {
start: () = console.log(Date.now()),
end: () = console.log(Date.now())
};
let iocConfig = {
components: {
myComponent: {
creator() {
...
Exodia
- 9
- Opened on May 5, 2016
- #46
sample code:
ioc.addComponent( single , {scope: singleton , creator: Object});
Promise.all([
new Promise(resolve = ioc.getComponent( single , resolve)),
new Promise(resolve = ioc.getComponent( single ...
bug
Exodia
- Opened on Apr 24, 2016
- #44
我们知道,在Spring中组件是可以声明式注册和注入的
@Service
public class Knife implements Weapon {
// ...
}
public class Character {
@Autowired
public Knife setWeapon(Weapon weapon) {
// ...
}
}
但是JavaScript在前端环境中,由于并没有类似ClassLoader的机制在运行前扫描所有的组件,所以纯粹前端环境是无法做自动注入的(根本不知道有哪些组件存在) ...
otakustay
- 2
- Opened on Apr 11, 2016
- #43

Learn how you can use GitHub Issues to plan and track your work.
Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub IssuesProTip!
Press the /
key to activate the search input again and adjust your query.
Learn how you can use GitHub Issues to plan and track your work.
Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub IssuesProTip!
Press the /
key to activate the search input again and adjust your query.