Files

30 lines
697 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(factory){
var nameSpace = 'field_4793655815239859651';
// 解决当前页面有多个相同自定义控件产生冲突的问题
if(!window[nameSpace]){
var Builder = factory();
window[nameSpace] = {
instance: {}
};
window[nameSpace].init = function (options) {
// 存放当前对象的实例privateId不同所有不会重复
window[nameSpace].instance[options.privateId] = new Builder(options);
};
}
})(function(){
/**
* 构造函数
* @param options
* @constructor
*/
function App(options) {
alert("初始化自定义控件");
}
return App;
});