|
|
@ -1,5 +1,5 @@ |
|
|
|
import { Base } from '../../Base'; |
|
|
|
import { PropsType, TableType } from '../../index'; |
|
|
|
import { PropsType, TableType, Constant } from '../../index'; |
|
|
|
|
|
|
|
/** |
|
|
|
* w-grid 获取内置组件ref对象API |
|
|
@ -9,9 +9,7 @@ export class ComponentRef extends Base { |
|
|
|
super(props, table); |
|
|
|
this.getQueryForm = this.getQueryForm.bind(this); |
|
|
|
this.getEditorDialog = this.getEditorDialog.bind(this); |
|
|
|
this.getCellEditorDialog = this.getCellEditorDialog.bind(this); |
|
|
|
this.getEditorForm = this.getEditorForm.bind(this); |
|
|
|
this.getCellEditorForm = this.getCellEditorForm.bind(this); |
|
|
|
this.getViewerDrawer = this.getViewerDrawer.bind(this); |
|
|
|
this.getViewerPanel = this.getViewerPanel.bind(this); |
|
|
|
} |
|
|
@ -20,16 +18,18 @@ export class ComponentRef extends Base { |
|
|
|
return this.table.componentRef.getTopRef().getQueryForm(); |
|
|
|
} |
|
|
|
getEditorDialog() { |
|
|
|
return this.table.componentRef.getEditorRef()?.getDialog(); |
|
|
|
} |
|
|
|
getCellEditorDialog() { |
|
|
|
return this.table.componentRef.getCellEditorRef()?.getDialog(); |
|
|
|
if (this.table.store.inlineEditStatus === Constant.EDIT_STATUS.CELL_DIALOG) { |
|
|
|
return this.table.componentRef.getCellEditorRef()?.getDialog(); |
|
|
|
} else { |
|
|
|
return this.table.componentRef.getEditorRef()?.getDialog(); |
|
|
|
} |
|
|
|
} |
|
|
|
getEditorForm() { |
|
|
|
return this.table.componentRef.getEditorRef()?.getForm(); |
|
|
|
} |
|
|
|
getCellEditorForm() { |
|
|
|
return this.table.componentRef.getCellEditorRef()?.getForm(); |
|
|
|
if (this.table.store.inlineEditStatus === Constant.EDIT_STATUS.CELL_DIALOG) { |
|
|
|
return this.table.componentRef.getCellEditorRef()?.getForm(); |
|
|
|
} else { |
|
|
|
return this.table.componentRef.getEditorRef()?.getForm(); |
|
|
|
} |
|
|
|
} |
|
|
|
getViewerDrawer() { |
|
|
|
return this.table.componentRef.getViewRef()?.getViewerDrawer(); |
|
|
|