luoyifan 3 anni fa
parent
commit
8abe3422d2
2 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 1 0
      src/controls/grid.js
  2. 3 3
      src/controls/input/textfield.js

+ 1 - 0
src/controls/grid.js

@@ -79,6 +79,7 @@ export default function () {
                             value: 20,
                             valueField: undefined,
                             displayField: undefined,
+                            hideClear: true,
                             store: ['20', '50', '100', '200', '300'],
                             listeners: {
                                 change: (sender, nv, ov) => {

+ 3 - 3
src/controls/input/textfield.js

@@ -62,9 +62,9 @@ export default function () {
             const me = this
             this.on({
                 change(sender, newVal) {
-                    const {hideTrigger, disabled, readOnly} = sender
-                    if (hideTrigger || disabled || readOnly) {
-                        // 禁用、隐藏、只读状态下,不需要显示清空按钮
+                    const {hideTrigger, disabled, readOnly, hideClear} = sender
+                    if (hideTrigger || disabled || readOnly || hideClear) {
+                        // 禁用、隐藏、只读、隐藏清空状态下,不需要显示清空按钮
                         return
                     }