|
平台从3.3升级到3.6后的打开这个文件时提示 Maximum call stack size exceeded,原来在3.3运行正常。
升级后发现这个文件的localStorage无法保存值。请指点。
define(function(require) {
var $ = require("jquery");
var justep = require("$UI/system/lib/justep");
var Model = function() {
this.callParent();
};
Model.prototype.PeoplesaveBTClick = function(event) {
window.localStorage.setItem("p_name", this.comp("h_name").val());
justep.Util.hint("设置成功!");
};
Model.prototype.modelLoad = function(event) {
this.comp("h_name").val(window.localStorage.getItem("p_name"));
// if (this.comp("h_name").val()!=="")
// {
// this.comp("h_name").set({"disabled":true});
// }
// else
// {
// this.comp("h_name").set({"disabled":false});
// }
};
Model.prototype.backBtnClick = function(event) {
window.location.href = './index.w';
};
Model.prototype.data1AfterNew = function(event) {
//event.source.setValue("id", justep.UUID.createUUID());// 为f_id自动创建值
};
Model.prototype.button3Click = function(event) {
var i=0;
var data = this.comp('data1');
var options = {
defaultValues : [ {
id : justep.UUID.createUUID(),
name : i+1
} ]
};
data.newData(options);
data.saveData({
"onSuccess" : function(event) {
event.source.refreshData();
}
});
};
return Model;
}); |
|