Browse Source

column添加edit事件

zhuth 7 years ago
parent
commit
37d66c0003
1 changed files with 10 additions and 6 deletions
  1. 10 6
      frontend/saas-web/app/view/core/form/field/DetailGridField.js

+ 10 - 6
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -20,12 +20,6 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         type: 'cellmodel'
         type: 'cellmodel'
     },
     },
     
     
-    plugins: {
-        cellediting: {
-            clicksToEdit: 1
-        }
-    },
-
     showIndex: true,
     showIndex: true,
     configUrl: '',
     configUrl: '',
     editable: true,
     editable: true,
@@ -45,6 +39,16 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         };
         };
 
 
         Ext.apply(me, {
         Ext.apply(me, {
+            plugins: {
+                cellediting: {
+                    clicksToEdit: 1,
+                    listeners: {
+                        edit: function(editor, context, eOpts) {
+                            context.column.fireEvent('edit', context.value);
+                        }
+                    }
+                }
+            },
             normalViewConfig: {
             normalViewConfig: {
                 deferEmptyText: false,
                 deferEmptyText: false,
                 emptyText: '无数据'
                 emptyText: '无数据'