浏览代码

CreateModule2 / parse

luoyifan 3 年之前
父节点
当前提交
4cef3272fc
共有 2 个文件被更改,包括 167 次插入252 次删除
  1. 166 251
      dist/yvan-ext.js
  2. 1 1
      dist/yvan-ext.js.map

+ 166 - 251
dist/yvan-ext.js

@@ -37844,40 +37844,21 @@ define(['exports'], function (exports) { 'use strict';
         };
         return PropertyDescription;
     }());
-    //# sourceMappingURL=PropertyDescription.js.map
 
     var PropertyDescriptionTable = new Map();
-    PropertyDescriptionTable.set('tabCell', new PropertyDescription({
-        props: [
-            {
-                name: 'header',
-                default: '',
-                group: 'common',
-                desc: '选项卡名称',
-                type: 'string'
-            },
-            {
-                name: 'close',
-                default: '',
-                group: 'common',
-                desc: '是否允许关闭',
-                type: 'boolean'
-            },
-        ]
-    }));
     var width = {
         name: 'width',
         default: '',
         group: 'common',
         desc: '宽',
-        type: 'number'
+        type: 'string'
     };
     var height = {
         name: 'height',
         default: '',
         group: 'common',
         desc: '高',
-        type: 'number'
+        type: 'string'
     };
     var fieldLabel = {
         name: 'fieldLabel',
@@ -37903,13 +37884,6 @@ define(['exports'], function (exports) { 'use strict';
         type: 'string',
         expr: true,
     };
-    var gravity = {
-        name: 'gravity',
-        default: 1,
-        group: 'common',
-        desc: '占位权重',
-        type: 'number'
-    };
     var disabled = {
         name: 'disabled',
         default: false,
@@ -37926,13 +37900,6 @@ define(['exports'], function (exports) { 'use strict';
         type: 'string',
         expr: true,
     };
-    var metaId = {
-        name: 'metaId',
-        default: '',
-        group: 'bind',
-        desc: '元数据ID',
-        type: 'string'
-    };
     var template = {
         name: 'template',
         default: '',
@@ -37941,6 +37908,14 @@ define(['exports'], function (exports) { 'use strict';
         type: 'string',
         expr: true,
     };
+    var reference = {
+        name: 'reference',
+        default: '',
+        group: 'common',
+        desc: '组件句柄',
+        type: 'string',
+        expr: true,
+    };
     var tooltip = {
         name: 'tooltip',
         default: '',
@@ -37948,59 +37923,65 @@ define(['exports'], function (exports) { 'use strict';
         desc: '悬停提示',
         type: 'string'
     };
-    PropertyDescriptionTable.set('rows', new PropertyDescription({
-        props: [
-            gravity,
-            width
-        ]
-    }));
+    // =============事件 ==============
+    var click = {
+        name: 'click',
+        default: '',
+        group: 'listeners',
+        desc: '点击事件',
+        eventParamter: [
+            'sender',
+            'e: any'
+        ],
+        type: 'listeners'
+    };
+    var change = {
+        name: 'change',
+        default: '',
+        group: 'listeners',
+        desc: 'value change事件',
+        eventParamter: [
+            'sender',
+            'e: any'
+        ],
+        type: 'listeners'
+    };
+    var keyup = {
+        name: 'keyup',
+        default: '',
+        group: 'listeners',
+        desc: '键盘按键抬起事件',
+        eventParamter: [
+            'sender',
+            'e'
+        ],
+        type: 'listeners'
+    };
+    var afterrender = {
+        name: 'afterrender',
+        default: '',
+        group: 'listeners',
+        desc: '控件渲染后触发',
+        eventParamter: [
+            'sender',
+            'e'
+        ],
+        type: 'listeners'
+    };
+    // =============特性 ==============
+    var fix = {
+        name: 'fix',
+        default: '',
+        group: 'fix',
+        desc: '特性',
+        type: 'fix',
+        expr: true,
+    };
     PropertyDescriptionTable.set('cols', new PropertyDescription({
         props: [
-            gravity,
             height
         ]
     }));
-    PropertyDescriptionTable.set('window', new PropertyDescription({
-        props: [
-            {
-                name: '_designMode',
-                default: 'module',
-                group: 'common',
-                desc: '设计类型',
-                type: ['none', 'dialog', 'scroll-dialog']
-            },
-            {
-                name: 'title',
-                default: '',
-                group: 'common',
-                desc: '对话框标题',
-                type: 'string'
-            },
-            {
-                name: 'modal',
-                default: '',
-                group: 'common',
-                desc: '是否模态',
-                type: 'boolean'
-            },
-            lodash.merge(lodash.cloneDeep(width), { default: 200 }),
-            lodash.merge(lodash.cloneDeep(height), { default: 200 }),
-            {
-                name: 'top',
-                default: 200,
-                group: 'common',
-                desc: '顶像素',
-                type: 'number'
-            },
-            {
-                name: 'left',
-                default: 200,
-                group: 'common',
-                desc: '左像素',
-                type: 'number'
-            }
-        ]
-    }));
     PropertyDescriptionTable.set('layout', new PropertyDescription({
         props: [
             {
@@ -38028,73 +38009,10 @@ define(['exports'], function (exports) { 'use strict';
     }));
     var YvBase = {
         props: [
-            {
-                name: 'bind',
-                default: '',
-                group: 'bind',
-                desc: '实体类名',
-                type: 'string'
-            },
-            {
-                name: 'ref',
-                default: '',
-                group: 'bind',
-                desc: '控件名',
-                type: 'string'
-            },
-            {
-                name: 'css',
-                default: '',
-                group: 'css',
-                desc: '样式类名',
-                type: 'string'
-            },
-            {
-                name: 'hidden',
-                default: false,
-                group: 'common',
-                desc: '是否显示',
-                type: 'boolean'
-            },
-            {
-                name: 'padding',
-                default: undefined,
-                group: 'css',
-                desc: '内边距',
-                type: 'object'
-            },
-            {
-                name: 'margin',
-                default: undefined,
-                group: 'css',
-                desc: '外边距',
-                type: 'object'
-            },
-            {
-                name: 'ff',
-                default: 0,
-                group: 'common',
-                desc: '自动定焦时间',
-                type: 'number'
-            },
-            width, height,
-            {
-                name: 'autowidth',
-                default: false,
-                group: 'common',
-                desc: '自动计算宽度',
-                type: 'boolean'
-            },
-            {
-                name: 'autoheight',
-                default: false,
-                group: 'common',
-                desc: '自动计算高度',
-                type: 'boolean'
-            },
+            width, height, reference, afterrender, fix
         ],
         events: [
-            { name: 'onRender', desc: '第一次控件被渲染时触发' }
+        // {name: 'onRender', desc: '第一次控件被渲染时触发'}
         ]
     };
     PropertyDescriptionTable.set('template', new PropertyDescription(YvBase, {
@@ -38150,7 +38068,6 @@ define(['exports'], function (exports) { 'use strict';
     PropertyDescriptionTable.set('viewer', new PropertyDescription(YvBase, {
         props: [
             value,
-            gravity,
             {
                 name: 'imgWidth',
                 default: '',
@@ -38170,7 +38087,6 @@ define(['exports'], function (exports) { 'use strict';
     PropertyDescriptionTable.set('image', new PropertyDescription(YvBase, {
         props: [
             value,
-            gravity,
             {
                 name: 'imgWidth',
                 default: '',
@@ -38187,12 +38103,93 @@ define(['exports'], function (exports) { 'use strict';
             }
         ]
     }));
-    PropertyDescriptionTable.set('scrollview', new PropertyDescription(YvBase, {
+    PropertyDescriptionTable.set('button', new PropertyDescription(YvBase, {
+        props: [text$1, disabled, height, width, iconCls, click, afterrender],
+    }));
+    PropertyDescriptionTable.set('fieldSet', new PropertyDescription(YvBase, {
         props: [
-            width, height
-        ]
+            fieldLabel, value, disabled,
+            tooltip, width, height
+        ],
+    }));
+    PropertyDescriptionTable.set('textfield', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, keyup, afterrender, change
+        ],
+    }));
+    PropertyDescriptionTable.set('searchfield', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, keyup, afterrender, change
+        ],
+    }));
+    PropertyDescriptionTable.set('radiogroup', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, keyup, afterrender, change
+        ],
+    }));
+    PropertyDescriptionTable.set('radio', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, keyup, afterrender, change
+        ],
+    }));
+    PropertyDescriptionTable.set('numberfield', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, keyup, afterrender, change
+        ],
+    }));
+    PropertyDescriptionTable.set('datetimepicker', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, keyup, afterrender, change
+        ],
+    }));
+    PropertyDescriptionTable.set('datetimefield', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, keyup, afterrender, change
+        ],
+    }));
+    PropertyDescriptionTable.set('datefield', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, keyup, afterrender, change
+        ],
+    }));
+    PropertyDescriptionTable.set('combogrid', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height
+        ],
+    }));
+    PropertyDescriptionTable.set('combo', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, keyup, afterrender, change
+        ],
+    }));
+    PropertyDescriptionTable.set('checkboxgroup', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, keyup, afterrender, change
+        ],
+    }));
+    PropertyDescriptionTable.set('checkbox', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, keyup, afterrender, change
+        ],
+    }));
+    PropertyDescriptionTable.set('yvgrid', new PropertyDescription(YvBase, {
+        props: [
+            fieldLabel, value, disabled,
+            tooltip, width, height, afterrender, change
+        ],
     }));
-    //# sourceMappingURL=PropertyDescriptionTable.js.map
 
     /*! *****************************************************************************
     Copyright (c) Microsoft Corporation.
@@ -61898,7 +61895,7 @@ define(['exports'], function (exports) { 'use strict';
      *      row-item rows中的一行,比如 tree / grid / panel 等等
      */
     function baseConfig(config, dragType) {
-        if (config && config.designMode && dragType) {
+        if (config && window["IS_DESIGN_MODE"] && dragType) {
             var cc = '';
             switch (dragType) {
                 case "cols-container":
@@ -61932,7 +61929,6 @@ define(['exports'], function (exports) { 'use strict';
         }
         return config;
     }
-    //# sourceMappingURL=base.js.map
 
     function initPanel () {
         /**
@@ -95428,23 +95424,23 @@ define(['exports'], function (exports) { 'use strict';
                     var row = [];
                     for (var j = 0; j < headers.length; j++) {
                         var key = headers[j].dataIndex;
-                        var value_1 = dataRow[key];
-                        if (!value_1 && value_1 !== 0) {
-                            value_1 = '';
+                        var value = dataRow[key];
+                        if (!value && value !== 0) {
+                            value = '';
                         }
-                        var oValue = value_1;
+                        var oValue = value;
                         if (typeof headers[j].renderer === 'function') {
                             try {
-                                value_1 = headers[j].renderer(value_1);
-                                if (!value_1 && value_1 !== 0) {
-                                    value_1 = oValue;
+                                value = headers[j].renderer(value);
+                                if (!value && value !== 0) {
+                                    value = oValue;
                                 }
                             }
                             catch (e) {
-                                value_1 = oValue;
+                                value = oValue;
                             }
                         }
-                        row.push(value_1);
+                        row.push(value);
                     }
                     data.push(row);
                 }
@@ -95739,12 +95735,6 @@ define(['exports'], function (exports) { 'use strict';
             //     dataSourceReload(this)
             // },
         });
-        PropertyDescriptionTable.set('yvgrid', new PropertyDescription(YvBase, {
-            props: [
-                fieldLabel, value, disabled,
-                gravity, tooltip, metaId, width, height
-            ],
-        }));
     }
     /**
      * 获取 columns 中所有的 dataIndex
@@ -95797,7 +95787,6 @@ define(['exports'], function (exports) { 'use strict';
         }
         // throw new TypeError('无法识别的调用方法')
     }
-    //# sourceMappingURL=grid.js.map
 
     function initTextfield () {
         var cc = Ext.form.field.Text.prototype.constructor;
@@ -95868,14 +95857,7 @@ define(['exports'], function (exports) { 'use strict';
                 initComponent.call(this);
             }
         });
-        PropertyDescriptionTable.set('textfield', new PropertyDescription(YvBase, {
-            props: [
-                fieldLabel, value, disabled,
-                gravity, tooltip, metaId, width, height
-            ],
-        }));
     }
-    //# sourceMappingURL=textfield.js.map
 
     function initTbFill () {
         /**
@@ -96173,14 +96155,7 @@ define(['exports'], function (exports) { 'use strict';
                 initComponent.call(this);
             },
         });
-        PropertyDescriptionTable.set('combo', new PropertyDescription(YvBase, {
-            props: [
-                fieldLabel, value, disabled,
-                gravity, tooltip, metaId, width, height
-            ],
-        }));
     }
-    //# sourceMappingURL=combo.js.map
 
     function initComboGridMulti () {
         Ext.define('Yvan.LocalComboGrid', {
@@ -96451,13 +96426,6 @@ define(['exports'], function (exports) { 'use strict';
             }
         });
     }
-    PropertyDescriptionTable.set('searchfield', new PropertyDescription(YvBase, {
-        props: [
-            fieldLabel, value, disabled,
-            gravity, tooltip, metaId, width, height
-        ],
-    }));
-    //# sourceMappingURL=search.js.map
 
     function initDate () {
         var cc = Ext.form.field.Date.prototype.constructor;
@@ -96492,13 +96460,13 @@ define(['exports'], function (exports) { 'use strict';
                         fn: function (sender) {
                             if (sender.format === 'Y-m-d') {
                                 // 年月日格式
-                                var value_1 = sender.getRawValue();
-                                if (/^\d{8}$/.test(value_1)) {
+                                var value = sender.getRawValue();
+                                if (/^\d{8}$/.test(value)) {
                                     // 8位数字,自动转换为 YYYY-MM-DD
                                     var newValue = [
-                                        value_1.substr(0, 4),
-                                        value_1.substr(4, 2),
-                                        value_1.substr(6, 2)
+                                        value.substr(0, 4),
+                                        value.substr(4, 2),
+                                        value.substr(6, 2)
                                     ].join('-');
                                     sender.setValue(newValue);
                                 }
@@ -96516,14 +96484,7 @@ define(['exports'], function (exports) { 'use strict';
                 initComponent.call(this);
             },
         });
-        PropertyDescriptionTable.set('datefield', new PropertyDescription(YvBase, {
-            props: [
-                fieldLabel, value, disabled,
-                gravity, tooltip, metaId, width, height
-            ],
-        }));
     }
-    //# sourceMappingURL=datefield.js.map
 
     function initDateTimePicker () {
         Ext.define('Yvan.DateTimePicker', {
@@ -96992,14 +96953,7 @@ define(['exports'], function (exports) { 'use strict';
                 initComponent.call(this);
             },
         });
-        PropertyDescriptionTable.set('numberfield', new PropertyDescription(YvBase, {
-            props: [
-                fieldLabel, value, disabled,
-                gravity, tooltip, metaId, width, height
-            ],
-        }));
     }
-    //# sourceMappingURL=numberfield.js.map
 
     function initCheckbox () {
         var cc = Ext.form.field.Checkbox.prototype.constructor;
@@ -97050,14 +97004,7 @@ define(['exports'], function (exports) { 'use strict';
                 initComponent.call(this);
             },
         });
-        PropertyDescriptionTable.set('checkbox', new PropertyDescription(YvBase, {
-            props: [
-                fieldLabel, value, disabled,
-                gravity, tooltip, metaId, width, height
-            ],
-        }));
     }
-    //# sourceMappingURL=checkbox.js.map
 
     function initCheckboxGroup () {
         var cc = Ext.form.CheckboxGroup.prototype.constructor;
@@ -97073,14 +97020,7 @@ define(['exports'], function (exports) { 'use strict';
                 initComponent.call(this);
             },
         });
-        PropertyDescriptionTable.set('checkboxgroup', new PropertyDescription(YvBase, {
-            props: [
-                fieldLabel, value, disabled,
-                gravity, tooltip, metaId, width, height
-            ],
-        }));
     }
-    //# sourceMappingURL=checkboxgroup.js.map
 
     function initRadio () {
         var cc = Ext.form.field.Radio.prototype.constructor;
@@ -97096,14 +97036,7 @@ define(['exports'], function (exports) { 'use strict';
                 initComponent.call(this);
             },
         });
-        PropertyDescriptionTable.set('radio', new PropertyDescription(YvBase, {
-            props: [
-                fieldLabel, value, disabled,
-                gravity, tooltip, metaId, width, height
-            ],
-        }));
     }
-    //# sourceMappingURL=radio.js.map
 
     function initRadioGroup () {
         var cc = Ext.form.RadioGroup.prototype.constructor;
@@ -97119,14 +97052,7 @@ define(['exports'], function (exports) { 'use strict';
                 initComponent.call(this);
             },
         });
-        PropertyDescriptionTable.set('radiogroup', new PropertyDescription(YvBase, {
-            props: [
-                fieldLabel, value, disabled,
-                gravity, tooltip, metaId, width, height
-            ],
-        }));
     }
-    //# sourceMappingURL=radiogroup.js.map
 
     function initFieldset () {
         /**
@@ -97139,14 +97065,7 @@ define(['exports'], function (exports) { 'use strict';
                 ct.call(this, newConfig);
             }
         });
-        PropertyDescriptionTable.set('fieldSet', new PropertyDescription(YvBase, {
-            props: [
-                fieldLabel, value, disabled,
-                gravity, tooltip, metaId, width, height
-            ],
-        }));
     }
-    //# sourceMappingURL=fieldset.js.map
 
     function initCombotree () {
         Ext.define('Yvan.ComboTree', {
@@ -131438,11 +131357,7 @@ define(['exports'], function (exports) { 'use strict';
                 ct.call(this, newConfig);
             }
         });
-        PropertyDescriptionTable.set('button', new PropertyDescription(YvBase, {
-            props: [text$1, disabled, height, width, iconCls],
-        }));
     }
-    //# sourceMappingURL=button.js.map
 
     function initIframe () {
         Ext.define('Ext.ux.IFrame', {

文件差异内容过多而无法显示
+ 1 - 1
dist/yvan-ext.js.map