12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import XEUtils from "xe-utils";
- export declare type GuidedOperationMap = {
- title: string,
- index: number;
- id: string
- }
- export class guidedOperation {
- private readonly list: GuidedOperationMap[];
- private readonly total: number = 0;
- private current: number = 0;
- private mask: HTMLElement;
- constructor(map: GuidedOperationMap[]) {
- this.list = XEUtils.orderBy(map, 'index')
- this.total = this.list.length
- this.renderMask()
- this.next()
- }
- private renderMask() {
- this.mask = document.createElement('div')
- this.mask.className = 'el-overlay'
- }
- private next() {
- if (this.current >= this.total) {
- return
- }
- const currentDocument = window.document.getElementById(this.list[this.current].id)
- document.body.append(this.mask)
- this.current++
- }
- private render() {
- }
- getElement() {
- return this.list
- }
- }
|