[]
Forguncy.Plugin.UserControlContainerBase
可以把组件作为子元素的单元格类型基类。
↳ UserControlContainerBase
• new UserControlContainerBase(...params)
| 属性名 | 类型 |
|---|---|
...params |
any[] |
• CellElement: CellContentElement<object>
在设计器中设置的单元格数据。
• ID: string
单元格的唯一键。
• IsInMasterPage: boolean
指定单元格是否在母版页中。
• designerPreviewCustomArgs: unknown[]
设计时预览自定义参数
CellTypeBase.designerPreviewCustomArgs
• isAttachmentCell: () => boolean
▸ (): boolean
是否是附件单元格
boolean
• isAutoFitHeight: () => boolean
▸ (): boolean
高度是否是自适应模式
boolean
• isAutoFitWidth: () => boolean
▸ (): boolean
宽度是否是自适应模式
boolean
• isDesignerPreview: boolean
是否是设计时预览
CellTypeBase.isDesignerPreview
• showDesignerPreviewError: (message: string) => void
▸ (message): void
在设计时预览里面显示错误信息
| 属性名 | 类型 |
|---|---|
message |
string |
void
CellTypeBase.showDesignerPreviewError
• get hasDestroyed(): boolean
判断单元格是否已经被销毁。
boolean
CellTypeBase.hasDestroyed
• get isInListView(): boolean
单元格类型是否位于表格中。
Example
// 在自定义单元格类的OnPageLoaded方法中,判断是不是位于表格中。
public onPageLoaded(info) {
if (this.isInListView) {
this.addCustomClass('celltype1-listview');
this.setDropDownAttributeInListView(this.getDropDownElement());
}
super.onPageLoaded(info);
}
boolean
CellTypeBase.isInListView
• get parentListView(): ListView
单元格类型所在的表格。
CellTypeBase.parentListView
▸ Protected addUserControl(containerDivID, userControlInfo): any
添加组件。
| 属性名 | 类型 | 说明 |
|---|---|---|
containerDivID |
string |
容纳组件的父容器的ID, 在调用该方法前,需要创建该元素。 |
userControlInfo |
any |
组件信息对象,在设计中由有[UserControlInfoProperty]标签的属性或参数生成。 |
any
▸ Protected checkAuthority(scope): boolean
检查当前用户对于单元是否有可见或可用权限。
| 属性名 | 类型 | 说明 |
|---|---|---|
scope |
UIPermissionScope |
单元格权限类型,如可用性权限。 |
boolean
如果当前用户有权限返回True,否则返回False。
▸ Protected checkPermissionGroupsAuthority(allowPermissionGroups): boolean
检查当前用户是否在有权限的权限组列表中。
| 属性名 | 类型 | 说明 |
|---|---|---|
allowPermissionGroups |
string[] |
有权限的权限组列表。 |
boolean
如果当前用户有权限返回True,否则返回False。
CellTypeBase.checkPermissionGroupsAuthority
▸ Protected checkRoleAuthority(allowRoles): boolean
检查当前用户是否在有权限的角色列表中。
| 属性名 | 类型 | 说明 |
|---|---|---|
allowRoles |
string[] |
有权限的角色列表。 |
boolean
如果当前用户有权限返回True,否则返回False。
CellTypeBase.checkRoleAuthority
▸ clearContextVariableValue(variableName): void
Internal use
| 属性名 | 类型 |
|---|---|
variableName |
string |
void
CellTypeBase.clearContextVariableValue
▸ commitValue(): void
提交该单元格类型的值。当单元格类型的值由UI改变时,调用此方法来提交值。
void
▸ createContent(): JQuery
创建该单元格类型的元素。需要在子类实现。
JQuery
jQuery,包含单元格类型元素的容器。
▸ destroy(): void
销毁这个单元格类型。如果这个单元格在页面跳转时需要做一些事情,则实现此方法。
void
▸ Protected destroyUserControl(containerDivID): any
删除组件。
| 属性名 | 类型 | 说明 |
|---|---|---|
containerDivID |
string |
容纳组件的父容器的ID。 |
any
▸ disable(): void
禁用这个单元格类型。如果此单元类型支持禁用状态,则实现此方法。
void
▸ enable(): void
启用这个单元格类型。如果此单元类型支持禁用状态,则实现此方法。
void
▸ evaluateFormula(formula, listViewContext?): any
计算公式的值。
| 属性名 | 类型 | 说明 |
|---|---|---|
formula |
any |
公式。 |
listViewContext? |
ListViewContext |
表格上下文,当单元格类型位于表格中,且公式引用了表格的单元格,该上下文指定计算哪一行的单元格。 |
any
计算结果。
▸ executeCommand(commands, context?): void
执行一组命令。当需要在子类中执行命令时调用此方法。
| 属性名 | 类型 | 说明 |
|---|---|---|
commands |
object[] |
一组命令的信息。 |
context? |
CommandContext |
可选参数。命令执行的上下文信息。 |
void
▸ executeCustomCommandObject(command, initParam, eventType?, callbackOnCommandCompleted?, commandId?): any
执行自定义命令对象列表。
| 属性名 | 类型 | 说明 |
|---|---|---|
command |
ICustomCommandObject |
命令。 |
initParam |
Object |
上下文参数值。 |
eventType? |
string |
事件类型(可选,用于区分不同命令)。 |
callbackOnCommandCompleted? |
Function |
命令执行完成时回调函数(可选)。 |
commandId? |
string |
- |
any
CellTypeBase.executeCustomCommandObject
▸ getApplicationResource(key, ...args): string
获取应用资源
| 属性名 | 类型 | 说明 |
|---|---|---|
key |
string |
资源名称 |
...args |
string[] |
占位符的值 |
string
CellTypeBase.getApplicationResource
▸ getAutoFitHeightInListView(value, text, cellStyle, context): number
获取在表格非编辑状态下的自适应行高。在基类中,该方法会返回默认显示文本的高度。
| 属性名 | 类型 | 说明 |
|---|---|---|
value |
any |
单元格的值。 |
text |
string |
单元格的显示文本。 |
cellStyle |
ListViewCellStyle |
单元格的样式信息。 |
context |
ListViewContext |
表格上下文。 |
number
自适应行高。
CellTypeBase.getAutoFitHeightInListView
▸ getAutoFitWidthInListView(value, text, cellStyle, context): number
获取在表格非编辑状态下的自适应列宽。在基类中,该方法会返回默认显示文本的宽度。
Example
// 如果我们在单元格右侧绘制了一个下拉按钮,那么需要重写该方法。
getAutoFitWidthInListView(value, text, cellRect, cellStyle, context) {
return super.getAutoFitWidthInListView(value, text, cellStyle, context) +
(this.showDropDownIcon(context) ? this.getIconWidth() : 0);
}
| 属性名 | 类型 | 说明 |
|---|---|---|
value |
any |
单元格的值。 |
text |
string |
单元格的显示文本。 |
cellStyle |
ListViewCellStyle |
单元格的样式信息。 |
context |
ListViewContext |
表格上下文。 |
number
自适应列宽。
CellTypeBase.getAutoFitWidthInListView
▸ getBindingDataSourceValue(bindingDataSourceModel, options, callback, reloadWhenDependenceChanged?): void
获取数据库数据。
| 属性名 | 类型 | 说明 |
|---|---|---|
bindingDataSourceModel |
any |
数据源查询模型,从设计器的BindingDataSourceProperty生成。 |
options |
queryDataOption |
查询配置。 |
callback |
(data: any) => void |
查询结果回调 |
reloadWhenDependenceChanged? |
boolean |
当依赖的单元格发生变化时,callback会被再次调用 |
void
CellTypeBase.getBindingDataSourceValue
▸ getContainer(): JQuery
获取单元格类型元素的容器。
JQuery
▸ getDebugValue(): any
获取该单元格在“调试:页面元素”中的值。
any
调试值
▸ getDefaultValue(): ICellTypeDefaultValue
获取该单元类型的默认值。页面加载后,单元格会显示默认值。如果默认值不是在设计器中设置的单元格值,则实现此方法。
默认值
▸ getElementTabIndex(): number
获取单元格的tab键顺序。
number
Tab键顺序值。
CellTypeBase.getElementTabIndex
▸ getFormulaCalcContext(): FormulaCalcContext
获取用于公式计算的数据上下文。
CellTypeBase.getFormulaCalcContext
▸ getHitTestTypeInListView(x, y, cellRect, context): any
在表格中,非编辑状态下,返回命中测试的结果。在相关Mouse事件处理函数中可以按照命中测试的结果进行下一步操作。
Example
//例如,自定义选择器,在表格非编辑状态下,鼠标悬停在下拉按钮位置时,将光标变成pointer并更改下拉按钮样式。
private _hoverRowIndex = -1;
public getHitTestTypeInListView(x, y, cellRect, context) {
if (context.cellState.isInvisible ||
context.cellState.isReadOnly ||
context.cellState.isDisabled) {
return null;
}
if (this.showDropDownIcon(context) && x > cellRect.x + cellRect.width - this.getIconWidth()) {
return 'DropDown';
}
}
public onMouseMoveInListView(hitInfo, context) {
if (hitInfo?.type === 'DropDown') {
context.cursor = 'pointer';
this._hoverRowIndex = context.rowIndex;
} else {
this._hoverRowIndex = -1;
}
super.onMouseMoveInListView(hitInfo, context);
}
public onMouseLeaveInListView(hitInfo, context) {
this._hoverRowIndex = -1;
super.onMouseLeaveInListView(hitInfo, context);
}
public paintInListView(ctx, value, cellRect, cellStyle, context) {
const isHoverOnDropDown = context.rowIndex === this._hoverRowIndex;
//Paint drop down and text
}
| 属性名 | 类型 | 说明 |
|---|---|---|
x |
number |
测试点的x坐标。 |
y |
number |
测试点的y坐标。 |
cellRect |
Rect |
单元格相对于Canvas的位置信息。 |
context |
ListViewContext |
表格上下文。 |
any
测试的结果。比如,当前位置是下拉按钮,可以返回‘DropDown’。
CellTypeBase.getHitTestTypeInListView
▸ Protected getPermissionMode(): PermissionMode
获取权限认证模式
PermissionMode
CellTypeBase.getPermissionMode
▸ getPluginResource(key, ...args): string
获取插件资源
| 属性名 | 类型 | 说明 |
|---|---|---|
key |
string |
资源名称 |
...args |
string[] |
占位符的值 |
string
CellTypeBase.getPluginResource
▸ getTextByValue(value, context?, format?, formattedData?): string
将值转换为文本。在某些单元格类型中,值与显示文本是不一样的,比如选择器,那么就需要重写该方法。
| 属性名 | 类型 | 说明 |
|---|---|---|
value |
any |
要转换的值。 |
context? |
ListViewContext |
表格上下文。 |
format? |
string |
- |
formattedData? |
object |
格式化数据。 |
string
转换的文本。
▸ Protected getUIPermission(scope): UIPermission
获取单元格的可见或可用权限信息。
| 属性名 | 类型 | 说明 |
|---|---|---|
scope |
UIPermissionScope |
单元格权限类型,如可用性权限。 |
▸ getValidateResult(value, validationInfo): Promise<ForguncyDataValidateResult>
获取验证结果。
| 属性名 | 类型 | 说明 |
|---|---|---|
value |
any |
需要校验的值。 |
validationInfo |
ForguncyDataValidationInfo |
校验信息。 |
Promise<ForguncyDataValidateResult>
校验结果。
CellTypeBase.getValidateResult
▸ getValidationErrorInListView(value, context): string
返回数据校验错误信息。校验表格中的数据时会被调用。
| 属性名 | 类型 | 说明 |
|---|---|---|
value |
any |
要校验的值。 |
context |
ListViewContext |
表格上下文。 |
string
错误信息,如果校验成功,则返回null。
CellTypeBase.getValidationErrorInListView
▸ getValueByText(text, context?): any
将文本转换为值。在某些单元格类型中,值与显示文本是不一样的,比如选择器,那么就需要重写该方法。
Example
// 在配置项中根据text寻找item,如果没有找到,返回WrongParseResult。
public getValueByText(text, context) {
if (this.isEmpty(text)) {
return null;
}
const item = this.options.find(item => item.text == text);
if (item) {
return item.value;
} else {
return new Forguncy.Plugin.WrongParseResult(text);
}
}
| 属性名 | 类型 | 说明 |
|---|---|---|
text |
any |
要转换的文本。 |
context? |
ListViewContext |
表格上下文。 |
any
转换的值。
▸ Protected getValueFromElement(): any
获取该单元类型的值。如果此单元格类型更改单元格的值,则实现此方法。
any
单元格的值。
CellTypeBase.getValueFromElement
▸ hasFocus(): boolean
获取该单元类型是否具有焦点。需要在子类实现。
boolean
▸ hideValidateTooltip(): void
隐藏数据校验的Tooltip。
void
CellTypeBase.hideValidateTooltip
▸ isDisabled(): boolean
获取该单元类型是否禁用。
boolean
▸ isReadOnly(): boolean
获取该单元类型是否只读。
boolean
▸ isReservedKeyInListView(event): boolean
在表格中,编辑状态,是否由单元格类型自己处理相关键盘事件。
Example
//在选择器中,按下Up,Down和Enter键时,不希望表格处理键盘事件,变更当前单元格。
public isReservedKeyInListView(event) {
if (super.isReservedKeyInListView(event)) {
return true;
}
return event.code === 'ArrowDown' ||
event.code === 'ArrowUp' ||
event.code === 'ArrowLeft' ||
event.code === 'ArrowRight' ||
(this._isDropDownOpened && event.code === 'Enter');
}
| 属性名 | 类型 | 说明 |
|---|---|---|
event |
KeyboardEvent |
键盘事件参数。 |
boolean
是否由单元格类型自己处理相关键盘事件。
CellTypeBase.isReservedKeyInListView
▸ moveCursorToEnd(): void
清除编辑器里的文本选择,并把光标移动至文本末尾。
void
▸ onBindingDataSourceDependenceCellValueChanged(bindingDataSourceModel, callback): void
当数据源引用的单元格值发生变更。每次执行的函数。
| 属性名 | 类型 |
|---|---|
bindingDataSourceModel |
any |
callback |
Function |
void
CellTypeBase.onBindingDataSourceDependenceCellValueChanged
▸ onBindingTableChanged(tableName): void
如果单元格绑定的数据源发生变化,可以通过重写此方法重新加载数据
| 属性名 | 类型 | 说明 |
|---|---|---|
tableName |
string |
变更的表名 |
void
CellTypeBase.onBindingTableChanged
▸ onClickInListView(hitInfo, context): void
在表格的非编辑状态下,处理鼠标点击事件。
Example
//例如,自定义选择器,在表格非编辑状态下,鼠标点击下拉按钮时,单元格进入编辑状态。点击清除按钮时,清除值。
public getHitTestTypeInListView(x, y, cellRect, context) {
if (context.cellState.isInvisible ||
context.cellState.isReadOnly ||
context.cellState.isDisabled) {
return null;
}
const dropDownRect = this.getDropDownRect(context);
if (dropDownRect && x > dropDownRect.x && x < dropDownRect.x + dropDownRect.width) {
return 'DropDown';
}
const deleteButtonRect = this.getDeleteButtonRect(context);
if (deleteButtonRect && x > deleteButtonRect.x && x < deleteButtonRect.x + deleteButtonRect.width) {
return 'DeleteButton';
}
}
public onMouseMoveInListView(hitInfo, context) {
if (hitInfo?.type === 'DropDown' || hitInfo?.type === 'DeleteButton') {
context.cursor = 'pointer';
}
super.onMouseMoveInListView(hitInfo, context);
}
public onClickInListView(hitInfo, context) {
if (hitInfo?.type === 'DropDown') {
//使表格当前单元格进入编辑状态。
this.parentListView.startEdit();
return;
}
if (hitInfo?.type === 'DeleteButton') {
//如果在onClickInListView方法中修改context.value的值,那么表格会更新该单元格的值。
context.value = null;
return;
}
}
| 属性名 | 类型 | 说明 |
|---|---|---|
hitInfo |
ListViewHitTestInfo |
命中测试信息。 |
context |
ListViewContext |
表格上下文。 |
void
CellTypeBase.onClickInListView
▸ onDependenceCellValueChanged(valueChangedCallback): void
附加一个处理函数在依赖的单元格的值发生变化时进行处理。如果c#类实现了IDependenceCells接口,则在子类中通过该方法附加一个处理函数。
| 属性名 | 类型 | 说明 |
|---|---|---|
valueChangedCallback |
Function |
当依赖单元值发生变化时,每次执行的函数。 |
void
CellTypeBase.onDependenceCellValueChanged
▸ onDestroyInListView(context): void
在表格中,当切换当前单元格时,会调用该方法,用于销毁当前编辑器,并在随后为新的单元格创建新的编辑器。
| 属性名 | 类型 | 说明 |
|---|---|---|
context |
ListViewContext |
表格上下文。 |
void
CellTypeBase.onDestroyInListView
▸ onEditEndInListView(context): void
在表格中,当单元格退出编辑状态时会调用该方法。
| 属性名 | 类型 | 说明 |
|---|---|---|
context |
ListViewContext |
表格上下文。 |
void
CellTypeBase.onEditEndInListView
▸ onEditStartInListView(context): void
在表格中,当单元格进入编辑状态时会调用该方法。
| 属性名 | 类型 | 说明 |
|---|---|---|
context |
ListViewContext |
表格上下文。 |
void
CellTypeBase.onEditStartInListView
▸ onFormulaResultChanged(formula, callback, calcImmediately?): any
在公式引用的单元格值发生变更时,重新计算公式的值。
| 属性名 | 类型 | 说明 |
|---|---|---|
formula |
any |
公式 |
callback |
(value: any) => void |
公式结果回调 |
calcImmediately? |
boolean |
是否立即计算,并调用回调函数,默认为true |
any
CellTypeBase.onFormulaResultChanged
▸ onListViewLoaded(): void
当所处表格加载好后调用该方法。
void
▸ onLoad(): void
如果这个单元格需要在所有单元格创建完成并添加到页面之后做一些事情,则实现此方法。
void
▸ onMouseDownInListView(hitInfo, context): void
在表格的非编辑状态下,处理鼠标按下事件。
| 属性名 | 类型 | 说明 |
|---|---|---|
hitInfo |
ListViewHitTestInfo |
命中测试信息。 |
context |
ListViewContext |
表格上下文。 |
void
CellTypeBase.onMouseDownInListView
▸ onMouseLeaveInListView(hitInfo, context): void
在表格的非编辑状态下,处理鼠标离开单元格事件
Example
//例如,自定义选择器,在表格非编辑状态下,鼠标悬停在下拉按钮位置时,将光标变成pointer并更改下拉按钮样式。
private _hoverRowIndex = -1;
public getHitTestTypeInListView(x, y, cellRect, context) {
if (context.cellState.isInvisible ||
context.cellState.isReadOnly ||
context.cellState.isDisabled) {
return null;
}
if (this.showDropDownIcon(context) && x > cellRect.x + cellRect.width - this.getIconWidth()) {
return 'DropDown';
}
}
public onMouseMoveInListView(hitInfo, context) {
if (hitInfo?.type === 'DropDown') {
context.cursor = 'pointer';
this._hoverRowIndex = context.rowIndex;
} else {
this._hoverRowIndex = -1;
}
super.onMouseMoveInListView(hitInfo, context);
}
public onMouseLeaveInListView(hitInfo, context) {
this._hoverRowIndex = -1;
super.onMouseLeaveInListView(hitInfo, context);
}
public paintInListView(ctx, value, cellRect, cellStyle, context) {
const isHoverOnDropDown = context.rowIndex === this._hoverRowIndex;
//Paint drop down and text
}
| 属性名 | 类型 | 说明 |
|---|---|---|
hitInfo |
ListViewHitTestInfo |
命中测试信息。 |
context |
ListViewContext |
表格上下文。 |
void
CellTypeBase.onMouseLeaveInListView
▸ onMouseMoveInListView(hitInfo, context): void
在表格的非编辑状态下,处理鼠标移动事件
Example
//例如,自定义选择器,在表格非编辑状态下,鼠标悬停在下拉按钮位置时,将光标变成pointer并更改下拉按钮样式。
private _hoverRowIndex = -1;
public getHitTestTypeInListView(x, y, cellRect, context) {
if (context.cellState.isInvisible ||
context.cellState.isReadOnly ||
context.cellState.isDisabled) {
return null;
}
if (this.showDropDownIcon(context) && x > cellRect.x + cellRect.width - this.getIconWidth()) {
return 'DropDown';
}
}
public onMouseMoveInListView(hitInfo, context) {
if (hitInfo?.type === 'DropDown') {
context.cursor = 'pointer';
this._hoverRowIndex = context.rowIndex;
} else {
this._hoverRowIndex = -1;
}
super.onMouseMoveInListView(hitInfo, context);
}
public onMouseLeaveInListView(hitInfo, context) {
this._hoverRowIndex = -1;
super.onMouseLeaveInListView(hitInfo, context);
}
public paintInListView(ctx, value, cellRect, cellStyle, context) {
const isHoverOnDropDown = context.rowIndex === this._hoverRowIndex;
//Paint drop down and text
}
| 属性名 | 类型 | 说明 |
|---|---|---|
hitInfo |
ListViewHitTestInfo |
命中测试信息。 |
context |
ListViewContext |
表格上下文。 |
void
CellTypeBase.onMouseMoveInListView
▸ onMouseUpInListView(hitInfo, context): void
在表格的非编辑状态下,处理鼠标抬起事件。
| 属性名 | 类型 | 说明 |
|---|---|---|
hitInfo |
ListViewHitTestInfo |
命中测试信息。 |
context |
ListViewContext |
表格上下文。 |
void
CellTypeBase.onMouseUpInListView
▸ onPageLoaded(info): void
如果这个单元格需要在所有单元格创建完成并添加到页面之后做一些事情,则实现此方法。
| 属性名 | 类型 |
|---|---|
info |
CellTypeInfo |
void
▸ paintInListView(ctx, value, cellRect, cellStyle, context): void
在Canvas中绘制单元格类型在表格中的非编辑状态。
Example
// 在单元格右侧绘制一个下拉按钮。
paintInListView(ctx, value, cellRect, cellStyle, context) {
const iconWidth = this.showDropDownIcon(context) ? this.getIconWidth() : 0;
const textWidth = cellRect.width - iconWidth;
if (textWidth > 0) {
const textRect = { ...cellRect };
textRect.width = textWidth;
super.paintInListView(ctx, value, textRect, cellStyle, context);
}
if (iconWidth > 0) {
const url = this.getDropDownSvgUrl();
const iconRect = {
x: cellRect.x + cellRect.width - this._iconWidth - this._iconPadding,
y: cellRect.y,
width: this._iconWidth,
height: cellRect.height
};
context.drawingHelper.paintSvg(url, "#a8abb2", ctx, iconRect, context);
}
}
| 属性名 | 类型 | 说明 |
|---|---|---|
ctx |
CanvasRenderingContext2D |
Canvas 2D渲染上下文。 |
value |
any |
单元格的值。 |
cellRect |
Rect |
单元格相对于Canvas的位置信息。 |
cellStyle |
ListViewCellStyle |
单元格的样式信息。 |
context |
ListViewContext |
表格上下文。 |
void
▸ reload(): void
重新加载此单元格类型的数据。如果该单元格类型使用表或视图的数据,则实现此方法。当表的数据可能发生更改时,将触发此方法。
void
▸ selectAll(): void
全选编辑器的文本。
void
▸ setBackColor(color): void
设置单元格的背景色。
| 属性名 | 类型 |
|---|---|
color |
string |
void
▸ setContextVariableValue(variableName, value): void
Internal use
| 属性名 | 类型 |
|---|---|
variableName |
string |
value |
any |
void
CellTypeBase.setContextVariableValue
▸ setDropDownAttributeInListView(elements): void
如果单元格类型在表格中使用且有下拉框,需要调用该方法设置一些属性。否则操作下拉框时,可能导致单元格退出编辑状态。
Example
//调用setDropDownAttributeInListView方法设置一些属性。
public onPageLoaded(info) {
if (this.isInListView) {
this.addCustomClass('celltype1-listview');
this.setDropDownAttributeInListView(this.getDropDownElement());
}
super.onPageLoaded(info);
}
| 属性名 | 类型 | 说明 |
|---|---|---|
elements |
HTMLElement[] |
下拉框元素。 |
void
CellTypeBase.setDropDownAttributeInListView
▸ setFocus(): void
设置焦点到该单元格类型。需要在子类实现。
void
▸ setFontStyle(styleInfo): void
为该单元格类型设置字体样式。如果该单元格类型显示单元格的字体设置,则实现此方法。
| 属性名 | 类型 | 说明 |
|---|---|---|
styleInfo |
StyleMetaData |
新的字体样式 |
void
▸ setReadOnly(value): void
设置单元格类型的只读状态。如果该单元格类型支持只读模式,则实现此方法
| 属性名 | 类型 | 说明 |
|---|---|---|
value |
boolean |
是否只读? |
void
▸ Protected setTabIndexToElement(tabIndex): void
设置单元格的tab键顺序。在基类中,会给单元格类型里的button,input,a和textarea元素设置tabindex,如果插件中需要给其他类型的元素设置tabindex,则需要重写该方法。
| 属性名 | 类型 | 说明 |
|---|---|---|
tabIndex |
number |
Tab键顺序值。 |
void
CellTypeBase.setTabIndexToElement
▸ setValueToElement(jelement, value): void
设置该单元类型的值。如果单元格的值发生更改,该单元格需要做出改动,则实现此方法。
| 属性名 | 类型 | 说明 |
|---|---|---|
jelement |
JQuery |
- |
value |
any |
赋予给单元格的值。 |
void
CellTypeBase.setValueToElement
▸ validate(): void
数据校验。
void