plugins 异步加载模块

This commit is contained in:
life
2015-10-27 18:23:51 +08:00
parent 848f1aff92
commit 0e0697e50b
8 changed files with 80 additions and 23 deletions

View File

@@ -4,7 +4,7 @@
* @date 2015/04/09
*/
define(function() {
var importService = nodeRequire('./public/plugins/import_leanote/import');
var importService; // = nodeRequire('./public/plugins/import_leanote/import');
var leanote = {
@@ -57,12 +57,6 @@ define(function() {
<div class="modal-body" id="">
<div role="tabpanel">
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#leanoteTab" aria-controls="leanoteTab" role="tab" data-toggle="tab">Leanote</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="leanoteTab">
@@ -133,6 +127,10 @@ define(function() {
me.clear();
if (!importService) {
importService = nodeRequire('./public/plugins/import_leanote/import');
}
importService.importFromLeanote(notebookId, paths,
// 全局
function(ok) {