<commit_before>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;
    },
    _createElementHtml: function(){
        debugger;
        var html = "<el-button";
        html += " :size=\"size\"";
        html += " :type=\"bttype\"";
        html += " :plain=\"plain\"";
        html += " :round=\"round\"";
        html += " :circle=\"circle\"";
        html += " :disabled=\"disabled\"";
        html += " :loading=\"loading\"";

        if (this.json.autofocus==="yes") html += " autofocus";

        if (this.json.elProperties){
            Object.keys(this.json.elProperties).forEach(function(k){
                if (this.json.elProperties[k]) html += " "+k+"=\""+this.json.elProperties[k]+"\"";
            }, this);
        }

        if (this.json.elStyles) html += " :style=\"elStyles\"";
        // if (this.json.elStyles){
        //     var style = "";
        //     Object.keys(this.json.elStyles).forEach(function(k){
        //         if (this.json.elStyles[k]) style += k+":"+this.json.elStyles[k]+";";
        //     }, this);
        //     html += " style=\""+style+"\"";
        // }

        html += ">"+((this.json.circle!=="yes" && this.json.isText!=="no") ? (this.json.name || this.json.id) : "")+"</el-button>";
        return html;
    }
}); <commit_msg>ELButton图标显示问题<commit_after>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(){
        debugger;
        var html = "<el-button";
        html += " :size=\"size\"";
        html += " :type=\"bttype\"";
        html += " :plain=\"plain\"";
        html += " :round=\"round\"";
        html += " :circle=\"circle\"";
        html += " :disabled=\"disabled\"";
        html += " :loading=\"loading\"";
        html += " :icon=\"icon\"";

        if (this.json.autofocus==="yes") html += " autofocus";

        if (this.json.elProperties){
            Object.keys(this.json.elProperties).forEach(function(k){
                if (this.json.elProperties[k]) html += " "+k+"=\""+this.json.elProperties[k]+"\"";
            }, this);
        }

        if (this.json.elStyles) html += " :style=\"elStyles\"";
        // if (this.json.elStyles){
        //     var style = "";
        //     Object.keys(this.json.elStyles).forEach(function(k){
        //         if (this.json.elStyles[k]) style += k+":"+this.json.elStyles[k]+";";
        //     }, this);
        //     html += " style=\""+style+"\"";
        // }

        html += ">"+((this.json.circle!=="yes" && this.json.isText!=="no") ? (this.json.name || this.json.id) : "")+"</el-button>";
        return html;
    }
}); 
{'fraction_non_alphanumeric': 0.19642547284400486, 'fraction_numerical': 0.0017352073572791948, 'mean_word_length': 2.3511627906976744, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2007132', 'n_tokens_mistral': 2100, 'n_tokens_neox': 2167, 'n_words': 314}