Permalink
Browse files

fix: 优化app的getComp相关api

  • Loading branch information...
LiuYueKai committed Jun 13, 2017
1 parent 06b53d1 commit 067acb848f055bafb08483663995d31f19d35611
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/createApp.js
View
@@ -24,6 +24,7 @@ const init = function (viewModel, element, doApplyBindings) {
element = [element];
}
this.elements = element;
this.comps = [];
each(this.elements, function (i, element) {
if (typeof element === 'string'){
element = document.querySelector(element);
@@ -37,6 +38,7 @@ const init = function (viewModel, element, doApplyBindings) {
self.adjustFunc.call(self, options);
var comp = compMgr.createDataAdapter({el:ele,options:options,model:viewModel,app:self});
ele['u-meta'] = comp;
self.comps.push(comp);
}
})
}

0 comments on commit 067acb8

Please sign in to comment.