瀏覽代碼

readonly 不允许出现clear

luoyifan 3 年之前
父節點
當前提交
0b47329eab
共有 3 個文件被更改,包括 9 次插入12 次删除
  1. 1 9
      dist/yvan-ext.css
  2. 7 2
      dist/yvan-ext.js
  3. 1 1
      dist/yvan-ext.js.map

+ 1 - 9
dist/yvan-ext.css

@@ -771,17 +771,9 @@
 }
 
 .x-grid-cell-inner-row-numberer {
-    text-align: center !important;
-}
-
-.x-grid-cell-inner-row-numberer {
     padding: 7px 0 6px 0;
 }
 
-.x-grid-cell-inner {
-    text-align: center !important;
-}
-
 .x-tree-view.x-tree-view-default .x-grid-cell-inner {
     text-align: left !important;
 }
@@ -807,4 +799,4 @@
 .x-grid-paging-toolbar .x-form-text-default {
     text-align: center;
     padding: 5px 0;
-}
+}

+ 7 - 2
dist/yvan-ext.js

@@ -130241,7 +130241,7 @@ define(['exports'], function (exports) { 'use strict';
                 /**
                  * 改变必填项之前加星号
                  */
-                if (this.allowBlank === false || this.validateBlank === true) {
+                if (this.config.readOnly !== true && (this.allowBlank === false || this.validateBlank === true)) {
                     // this.beforeLabelTextTpl = [
                     //     '<span style="color:red;font-weight:bold" data-qtip="必填选项">*</span>'
                     // ];
@@ -131016,6 +131016,7 @@ define(['exports'], function (exports) { 'use strict';
             },
         });
     }
+    //# sourceMappingURL=datefield.js.map
 
     function initDateTimePicker () {
         Ext.define('Yvan.DateTimePicker', {
@@ -132101,6 +132102,11 @@ define(['exports'], function (exports) { 'use strict';
             onChange: function (newVal, oldVal) {
                 var me = this;
                 var value = newVal;
+                var hideTrigger = me.hideTrigger, disabled = me.disabled, readOnly = me.readOnly, hideClear = me.hideClear;
+                if (hideTrigger || disabled || readOnly || hideClear) {
+                    // 禁用、隐藏、只读、隐藏清空状态下,不需要显示清空按钮
+                    return;
+                }
                 if (value) {
                     me.getTrigger('clear').show();
                     me.updateLayout();
@@ -132148,7 +132154,6 @@ define(['exports'], function (exports) { 'use strict';
             }
         });
     }
-    //# sourceMappingURL=combogrid.js.map
 
     function initRows () {
         Ext.define('Yvan.Rows', {

File diff suppressed because it is too large
+ 1 - 1
dist/yvan-ext.js.map