提交 7a1f03fa 编写于 作者: 蔡祥熠

Merge branch 'hotfix/datatable_resetData' into 'master'

Merge of hotfix/datatable_resetData 修复数据表格、数据模板通过this.data.xxx赋值无效的问题,并去除了api中resetdata的描述 to master

See merge request o2oa/o2oa!645

(cherry picked from commit 1d4e521b)

431aed31 修复数据表格、数据模板通过this.data.xxx赋值无效的问题,并去除了api中resetdata的描述
上级 667ad0bb
......@@ -13,7 +13,6 @@ MWF.xDesktop.requireApp("cms.Xform", "Org", null, false);
* field.hide(); //隐藏字段
* var id = field.json.id; //获取字段标识
* var flag = field.isEmpty(); //字段是否为空
* field.resetData(); //重置字段的值为默认值或置空
* @extends MWF.xApplication.process.Xform.Org
* @o2category FormComponents
* @o2range {CMS}
......
......@@ -13,7 +13,6 @@ MWF.xDesktop.requireApp("cms.Xform", "Org", null, false);
* field.hide(); //隐藏字段
* var id = field.json.id; //获取字段标识
* var flag = field.isEmpty(); //字段是否为空
* field.resetData(); //重置字段的值为默认值或置空
* @extends MWF.xApplication.process.Xform.Org
* @o2category FormComponents
* @o2range {CMS}
......
......@@ -346,11 +346,11 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class(
return this._getBusinessData();
}
},
/**
* @summary 重置组件的值为默认值或置空。
* @example
* this.form.get('subject').resetData();
*/
// /**
// * @summary 重置组件的值为默认值或置空。
// * @example
// * this.form.get('subject').resetData();
// */
resetData: function(){
this.setData(this.getValue());
},
......
......@@ -1453,11 +1453,11 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class(
if (this.table) this.table.setStyle("display", "none");
}
},
/**
* @summary 重置数据网格的值为默认值或置空。
* @example
* this.form.get('fieldId').resetData();
*/
// /**
// * @summary 重置数据网格的值为默认值或置空。
// * @example
// * this.form.get('fieldId').resetData();
// */
resetData: function(){
this.setData(this._getValue());
},
......
......@@ -1438,11 +1438,11 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
this._loadDatagridStyle();
}
},
/**
* @summary 重置数据网格的值为默认值或置空。
* @example
* this.form.get('fieldId').resetData();
*/
// /**
// * @summary 重置数据网格的值为默认值或置空。
// * @example
// * this.form.get('fieldId').resetData();
// */
resetData: function(){
this.setData(this._getValue());
},
......
......@@ -867,13 +867,14 @@ MWF.xApplication.process.Xform.DatatablePC = new Class(
_afterLoaded: function(){
},
/**
* @summary 重置数据表格的值为默认值或置空。
* @example
* this.form.get('fieldId').resetData();
*/
// /**
// * @summary 重置数据表格的值为默认值或置空。
// * @example
// * this.form.get('fieldId').resetData();
// */
resetData: function(){
var value = this.getDefaultValue() || {"data": [], "total":{}};
//var value = this.getDefaultValue() || {"data": [], "total":{}};
var value = this.getValue();
this.setData( value );
},
/**当参数为Promise的时候,请查看文档: {@link https://www.yuque.com/o2oa/ixsnyt/ws07m0|使用Promise处理表单异步}<br/>
......
......@@ -636,13 +636,14 @@ MWF.xApplication.process.Xform.Datatemplate = MWF.APPDatatemplate = new Class(
_afterLoaded: function(){
},
/**
* @summary 重置数据模板的值为默认值或置空。
* @example
* this.form.get('fieldId').resetData();
*/
// /**
// * @summary 重置数据模板的值为默认值或置空。
// * @example
// * this.form.get('fieldId').resetData();
// */
resetData: function(){
var value = this.getDefaultValue() || [];
// var value = this.getDefaultValue() || [];
var value = this.getValue() || [];
this.setData(value);
},
/**当参数为Promise的时候,请查看文档: {@link https://www.yuque.com/o2oa/ixsnyt/ws07m0|使用Promise处理表单异步}<br/>
......
......@@ -462,11 +462,11 @@ MWF.xApplication.process.Xform.Htmleditor = MWF.APPHtmleditor = new Class(
_loadValue: function(){
var data = this._getBusinessData();
},
/**
* @summary 重置组件的值为默认值或置空。
* @example
* this.form.get('fieldId').resetData();
*/
// /**
// * @summary 重置组件的值为默认值或置空。
// * @example
// * this.form.get('fieldId').resetData();
// */
resetData: function(){
this.setData(this._getBusinessData());
},
......
......@@ -14,7 +14,6 @@ MWF.xDesktop.requireApp("process.Work", "lp." + o2.language, null, false);
* field.hide(); //隐藏字段
* var id = field.json.id; //获取字段标识
* var flag = field.isEmpty(); //字段是否为空
* field.resetData(); //重置字段的值为默认值或置空
* @extends MWF.xApplication.process.Xform.$Input
* @o2category FormComponents
* @o2range {Process}
......
......@@ -15,7 +15,6 @@ MWF.require("MWF.widget.O2Identity", null, false);
* field.hide(); //隐藏字段
* var id = field.json.id; //获取字段标识
* var flag = field.isEmpty(); //字段是否为空
* field.resetData(); //重置字段的值为默认值或置空
* @extends MWF.xApplication.process.Xform.$Input
* @o2category FormComponents
* @o2range {Process|CMS|Portal}
......
......@@ -14,7 +14,6 @@ MWF.require("MWF.widget.UUID", null, false);
* field.hide(); //隐藏字段
* var id = field.json.id; //获取字段标识
* var flag = field.isEmpty(); //字段是否为空
* field.resetData(); //重置字段的值为默认值或置空
* @extends MWF.xApplication.process.Xform.$Input
* @o2category FormComponents
* @o2range {Process|CMS|Portal}
......
......@@ -13,7 +13,6 @@ MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
* field.hide(); //隐藏字段
* var id = field.json.id; //获取字段标识
* var flag = field.isEmpty(); //字段是否为空
* field.resetData(); //重置字段的值为默认值或置空
* @extends MWF.xApplication.process.Xform.$Input
* @o2category FormComponents
* @o2range {Process|CMS|Portal}
......
......@@ -13,7 +13,6 @@ MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
* field.hide(); //隐藏字段
* var id = field.json.id; //获取字段标识
* var flag = field.isEmpty(); //字段是否为空
* field.resetData(); //重置字段的值为默认值或置空
* @extends MWF.xApplication.process.Xform.$Input
* @o2category FormComponents
* @o2range {Process|CMS|Portal}
......
......@@ -13,7 +13,6 @@ MWF.xDesktop.requireApp("process.Xform", "$Input", null, false);
* field.hide(); //隐藏字段
* var id = field.json.id; //获取字段标识
* var flag = field.isEmpty(); //字段是否为空
* field.resetData(); //重置字段的值为默认值或置空
* @extends MWF.xApplication.process.Xform.$Input
* @o2category FormComponents
* @o2range {Process|CMS|Portal}
......
......@@ -205,11 +205,11 @@ MWF.xApplication.process.Xform.TinyMCEEditor = MWF.APPTinyMCEEditor = new Class(
_loadValue: function () {
var data = this._getBusinessData();
},
/**
* @summary 重置组件的值为默认值或置空。
* @example
* this.form.get('fieldId').resetData();
*/
// /**
// * @summary 重置组件的值为默认值或置空。
// * @example
// * this.form.get('fieldId').resetData();
// */
resetData: function () {
this.setData(this._getBusinessData());
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册