跳到主要内容

DateEditor

Defined in: packages/rxdb-model/dist/entity-table/editors/date-editor.d.ts:11

日期时间选择编辑器

直接覆盖单元格显示原生 datetime-local 输入框。

  • Enter / Tab:确认
  • Escape:取消(恢复原始值)
  • 点击外部:确认并关闭
  • 「清除」按钮:将值设为 null

Implements​

  • IEditor<unknown>

Constructors​

Constructor​

new DateEditor(): DateEditor;

Returns​

DateEditor

Properties​

editorType​

readonly editorType: "date-editor" = "date-editor";

Defined in: packages/rxdb-model/dist/entity-table/editors/date-editor.d.ts:14

VTable 编辑器类型标识(注册到 VTable 的编辑器名)

Methods​

getValue()​

getValue(): Date | null;

Defined in: packages/rxdb-model/dist/entity-table/editors/date-editor.d.ts:18

返回当前选择的日期值

Returns​

Date | null

Implementation of​

IEditor.getValue

isEditorElement()​

isEditorElement(el): boolean;

Defined in: packages/rxdb-model/dist/entity-table/editors/date-editor.d.ts:22

判断目标元素是否属于编辑器浮层

Parameters​

ParameterType
elEventTarget | HTMLElement

Returns​

boolean

Implementation of​

IEditor.isEditorElement

onEnd()​

onEnd(): void;

Defined in: packages/rxdb-model/dist/entity-table/editors/date-editor.d.ts:20

结束编辑:清理浮层面板与事件监听

Returns​

void

Implementation of​

IEditor.onEnd

onStart()​

onStart(ctx): void;

Defined in: packages/rxdb-model/dist/entity-table/editors/date-editor.d.ts:16

打开编辑器:构建浮层面板并初始化原生 datetime-local 输入

Parameters​

ParameterType
ctxEditContext<unknown>

Returns​

void

Implementation of​

IEditor.onStart