刘光辉
12 小时以前 0dfe84494048ce27ba8449831782128412d3eb13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { Disposable } from '@univerjs/core';
 
export class JnpfSheetsFloatDomService extends Disposable {
  // private _floatEchartItems: Record<string, any> = {};
  //
  // private _floatImageItems: Record<string, any> = {};
  // private _piniaStoreId: null | string = null;
 
  // eslint-disable-next-line @typescript-eslint/no-useless-constructor
  constructor() {
    super();
 
    // this._addFloatDomHook();
  }
 
  // 存入图表列表数据
  public saveFloatEchartItems(data: any) {
    // this._floatEchartItems = data;
  }
 
  // 存入图片列表数据
  public saveFloatImageItems(data: any) {
    // this._floatImageItems = data;
  }
 
  // 存入store的id
  public savePiniaStoreId(data: any) {
    // this._piniaStoreId = data;
  }
 
  // 增加Hook
  // private _addFloatDomHook() {
  //   this.disposeWithMe(
  //     this._sheetCanvasFloatDomManagerService.addHook({
  //       onGetFloatDomProps: (id: string) => {
  //         if (this._floatImageItems?.hasOwnProperty(id)) {
  //           const { domId } = this._floatImageItems[id] ?? {};
  //           return { id: domId, piniaStoreId: this._piniaStoreId };
  //         }
  //
  //         if (this._floatEchartItems?.hasOwnProperty(id)) {
  //           const { domId } = this._floatEchartItems[id] ?? {};
  //           return { id: domId, piniaStoreId: this._piniaStoreId };
  //         }
  //
  //         return {
  //           id,
  //         };
  //       },
  //     }),
  //   );
  // }
}