SelectionRangeElem.d.ts 738 B

1234567891011121314151617181920212223242526
  1. declare type SelectionRangeType = HTMLElement | ChildNode[];
  2. declare type SetSelectionRangeType = SelectionRangeType | DocumentFragment;
  3. export declare type SelectionRangeElemType = SelectionRangeType | null;
  4. /**
  5. * @description 选区的 Element
  6. * @author tonghan
  7. */
  8. declare class SelectionRangeElem {
  9. private _element;
  10. constructor();
  11. /**
  12. * 设置 SelectionRangeElem 的值
  13. * @param { SetSelectionRangeType } data
  14. */
  15. set(data: SetSelectionRangeType): void;
  16. /**
  17. * 获取 SelectionRangeElem 的值
  18. * @returns { SelectionRangeType } Elem
  19. */
  20. get(): SelectionRangeElemType;
  21. /**
  22. * 清除 SelectionRangeElem 的值
  23. */
  24. clear(): void;
  25. }
  26. export default SelectionRangeElem;