Permalink
Browse files

fix: 代码compMgr处理提到外部

  • Loading branch information...
whizbz11 committed Mar 7, 2017
1 parent 2d70414 commit edd214e57149706f7759e4d377ca1aff6714d669
@@ -7,7 +7,11 @@
//Sparrow import
import {extend} from 'tinper-sparrow/src/extend';
import {BaseComponent} from './neoui-BaseComponent';
import {on} from 'tinper-sparrow/src/event';
import {compMgr} from 'compox/src/compMgr';
//Neoui import
import {Autocomplete} from './neoui-autocomplete';
import {Button} from './neoui-button';
@@ -94,7 +98,8 @@ var ex = {
Month : Month,
Year : Year,
YearMonth : YearMonth,
MonthDate : MonthDate
MonthDate : MonthDate,
compMgr :compMgr
// ajax: ajax,
@@ -162,4 +167,14 @@ var ex = {
extend(ex,window.u || {});
window.u = ex;
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {ex as u};
@@ -579,13 +579,6 @@ compMgr.regComp({
compAsString: 'u.Autocomplete',
css: 'u-autocomplete'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Autocomplete};
@@ -46,12 +46,5 @@ compMgr.regComp({
compAsString: 'u.Button',
css: 'u-button'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Button};
@@ -233,12 +233,5 @@ compMgr.regComp({
compAsString: 'u.Checkbox',
css: 'u-checkbox'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Checkbox};
@@ -456,12 +456,5 @@ if(!env.isIE8){
});
}
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {ClockPicker};
@@ -115,12 +115,5 @@ compMgr.regComp({
compAsString: 'u.collapse.updown',
css: 'u-collapse-updown'
});
if (document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function () {
//扫描并生成控件
compMgr.updateComp();
});
}
export {showCollapse};
@@ -491,12 +491,5 @@ compMgr.regComp({
compAsString: 'u.Combo',
css: 'u-combo'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Combo};
@@ -551,14 +551,4 @@ compMgr.regComp({
css: 'u-combobox'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Combobox};
@@ -96,13 +96,5 @@ compMgr.regComp({
css: 'u-table'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Table};
@@ -1501,13 +1501,5 @@ if(!env.isMobile){
});
}
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {DateTimePicker};
@@ -239,13 +239,6 @@ compMgr.regComp({
compAsString: 'u.MDLayout',
css: 'u-mdlayout'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {MDLayout};
@@ -496,13 +496,6 @@ compMgr.regComp({
css: 'u-navlayout'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {NavLayout,NavLayoutTab};
@@ -97,14 +97,14 @@ var hideLoading = function() {
document.body.removeChild(divs[i]);
}
}
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
// if(document.readyState && document.readyState === 'complete') {
// compMgr.updateComp();
// } else {
// on(window, 'load', function() {
// //扫描并生成控件
// compMgr.updateComp();
// });
// }
//兼容性保留
var showWaiting = showLoading
var removeWaiting = hideLoading
@@ -494,13 +494,6 @@ compMgr.regComp({
compAsString: 'u.Menu',
css: 'u-menu'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Menu};
@@ -163,13 +163,6 @@ if(env.isMobile){
});
}
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {MobDateTimePicker};
@@ -253,12 +253,5 @@ compMgr.regComp({
compAsString: 'u.Month',
css: 'u-month'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Month};
@@ -367,12 +367,5 @@ compMgr.regComp({
compAsString: 'u.MonthDate',
css: 'u-monthdate'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {MonthDate};
@@ -163,14 +163,5 @@ compMgr.regComp({
css: 'u-multilang'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Multilang};
@@ -84,13 +84,6 @@ compMgr.regComp({
css: 'u-navmenu'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {NavMenu};
@@ -408,13 +408,6 @@ if(compMgr)
css: 'u-pagination'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {pagination};
@@ -104,12 +104,5 @@ compMgr.regComp({
compAsString: 'u.Progress',
css: 'u-progress'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Progress};
@@ -221,13 +221,5 @@ compMgr.regComp({
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Radio};
@@ -166,13 +166,6 @@ compMgr.regComp({
css: 'u-switch'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Switch};
@@ -124,13 +124,6 @@ compMgr.regComp({
compAsString: 'u.Tabs',
css: 'u-tabs'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Tabs};
@@ -218,12 +218,5 @@ compMgr.regComp({
compAsString: 'u.Text',
css: 'u-text'
});
if(document.readyState && document.readyState === 'complete') {
compMgr.updateComp();
} else {
on(window, 'load', function() {
//扫描并生成控件
compMgr.updateComp();
});
}
export {Text};
Oops, something went wrong.

0 comments on commit edd214e

Please sign in to comment.