mwf.xdesktop.requireapp("process.xform", "$elmodule", null, false);
/** @class elbutton 基于element ui的按钮组件。
* @o2cn 按钮组件
* @example
* //可以在脚本中获取该组件
* //方法1:
* var button = this.form.get("name"); //获取组件
* //方法2
* var button = this.target; //在组件事件脚本中获取
* @extends mwf.xapplication.process.xform.$module
* @o2category formcomponents
* @o2range {process|cms|portal}
* @hideconstructor
* @see {@link https://element.eleme.cn/#/zh-cn/component/button|element ui button 按钮}
*/
mwf.xapplication.process.xform.elbutton = mwf.appelbutton = new class(
/** @lends mwf.xapplication.process.xform.elbutton# */
{
implements: [events],
extends: mwf.app$elmodule,
/**
* @summary 组件的配置信息,同时也是vue组件的data。
* @member mwf.xapplication.process.xform.elbutton#json {jsonobject}
* @example
* //可以在脚本中获取此对象,下面两行代码是等价的,它们获取的是同一个对象
* var json = this.form.get("elbutton").json; //获取组件的json对象
* var json = this.form.get("elbutton").vm.$data; //获取vue组件的data数据,
*
* //通过json对象操作element组件
* json.bttype = "success"; //将按钮样式改为success
* json.loading = true; //将按钮显示为加载中状态
* json.disabled = true; //将按钮设置为禁用
*/
_appendvuedata: function(){
if (!this.json.size) this.json.size = "";
if (!this.json.bttype) this.json.bttype = "";
if (!this.json.plain) this.json.plain = false;
if (!this.json.round) this.json.round = false;
if (!this.json.circle) this.json.circle = false;
if (!this.json.disabled) this.json.disabled = false;
if (!this.json.loading) this.json.loading = false;
if (!this.json.icon) this.json.icon = false;
},
_createelementhtml: function(){
var html = "";
html = "";
return html;
}
});
source