o2oa api: x-游戏厅捕鱼达人

source

o2.xdesktop.requireapp("process.xform", "$elinput", null, false);
/** @class elinput 基于element ui的输入框组件。
 * @o2cn 输入框
 * @example
 * //可以在脚本中获取该组件
 * //方法1:
 * var input = this.form.get("name"); //获取组件
 * //方法2
 * var input = this.target; //在组件事件脚本中获取
 * @extends mwf.xapplication.process.xform.$module
 * @o2category formcomponents
 * @o2range {process|cms|portal}
 * @hideconstructor
 * @see {@link https://element.eleme.cn/#/zh-cn/component/input|element ui input 输入框}
 */
mwf.xapplication.process.xform.elinput = mwf.appelinput =  new class(
    /** @lends o2.xapplication.process.xform.elinput# */
    {
    implements: [events],
    extends: mwf.app$elinput,
    options: {
        "moduleevents": ["load", "queryload", "postload"],
        /**
         * 当 input 获得焦点时触发。this.event[0]指向event
         * @event mwf.xapplication.process.xform.elinput#focus
         * @see {@link https://element.eleme.cn/#/zh-cn/component/input|输入组件的input events章节}
         */
        /**
         * 当 input 失去焦点时触发。this.event[0]指向event
         * @event mwf.xapplication.process.xform.elinput#blur
         * @see {@link https://element.eleme.cn/#/zh-cn/component/input|输入组件的input events章节}
         */
        /**
         * 仅在输入框失去焦点或用户按下回车时触发。this.event[0]为组件的value
         * @event mwf.xapplication.process.xform.elinput#change
         * @see {@link https://element.eleme.cn/#/zh-cn/component/input|输入组件的input events章节}
         */
        /**
         * 在 input 值改变时触发。this.event[0]为组件的value
         * @event mwf.xapplication.process.xform.elinput#input
         * @see {@link https://element.eleme.cn/#/zh-cn/component/input|输入组件的input events章节}
         */
        /**
         * 在点击由 clearable 属性生成的清空按钮时触发
         * @event mwf.xapplication.process.xform.elinput#clear
         * @see {@link https://element.eleme.cn/#/zh-cn/component/input|输入组件的input events章节}
         */
        "elevents": ["focus", "blur", "change", "input", "clear"]
    },
    _appendvuedata: function(){
        if (!this.json.maxlength) this.json.maxlength = "";
        if (!this.json.minlength) this.json.minlength = "";
        if (!this.json.showwordlimit) this.json.showwordlimit = false;
        if (!this.json.showpassword) this.json.showpassword = false;
        if (!this.json.disabled) this.json.disabled = false;
        if (!this.json.clearable) this.json.clearable = false;
        if (!this.json.size) this.json.size = "";
        if (!this.json.prefixicon) this.json.prefixicon = "";
        if (!this.json.suffixicon) this.json.suffixicon = "";
        if (!this.json.rows) this.json.rows = 2;
        if (!this.json.autosize) this.json.autosize = false;
        if (!this.json.readonly) this.json.readonly = false;
        if (!this.json.resize) this.json.resize = "none";
        if (!this.json.description) this.json.description = "";
        if (this.json.minrows && this.json.maxrows){
            this.json.autosize = {minrows: this.json.minrows.toint(), maxrows: this.json.maxrows.toint()}
        }
    },
    // appendvueextend: function(app){
    //     if (!app.methods) app.methods = {};
    //     app.methods.$loadelevent = function(ev){
    //         this.validationmode();
    //         if (ev==="change") this._setbusinessdata(this.getinputdata());
    //         if (this.json.events && this.json.events[ev] && this.json.events[ev].code){
    //             this.form.macro.fire(this.json.events[ev].code, this, event);
    //         }
    //     }.bind(this);
    // },
    _createelementhtml: function(){
        //var numberstr = (this.json.inputtype === "number" && this.json.resulttype === "number" ) ? ".number" : "";
        var html = "
网站地图