主题: 加载数据很慢 |
作者: 日子依旧, 发布日期: 2013-05-27 15:46:36, 浏览数: 2197 |
$(document).ready(function () { KindEditor.ready(function (K) { editor1 = K.create('#content1', { cssPath: '/Resource/kindeditor/plugins/code/prettify.css', uploadJson: '/Resource/kindeditor/asp.net/upload_json.ashx', fileManagerJson: '/Resource/kindeditor/asp.net/file_manager_json.ashx', allowFileManager: true, afterCreate: function () { var self = this; K.ctrl(document, 13, function () { self.sync(); K('form[name=example]')[0].submit(); }); K.ctrl(self.edit.doc, 13, function () { self.sync(); K('form[name=example]')[0].submit(); }); } }); }); $(".query-btn").bind("click", SaveData); Load(); }); function Load() { if (top.BaseId && top.BaseId != undefined) BaseId = top.BaseId; condition.BaseId = BaseId; var fun = function () { service.GetBaseinfoCube(condition, callBack); fun = null; return callBack; } loadingPanel.StartLoading(fun); var callBack = function (d) { if (d && d.result) { Id = d.result[0].id; if (type == 1) editor1.html(d.result[0].traffic_desc == null ? "" : d.result[0].traffic_desc); else editor1.html(d.result[0].kinetonema_desc == null ? "" : d.result[0].kinetonema_desc); } else { debugger; } loadingPanel.LoadingOK(); return false; } }; 出现这样的 情况,开始加载了控件,然后我绑定数据到控件上,这样就非常的慢,感觉绑定数据这里很慢
editor1.html()这个方法里面 |