mxcad-app 1.0.66 → 1.0.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/chunks/es.regexp.constructor.js.gz +0 -0
  2. package/dist/chunks/hooks.js +1 -1
  3. package/dist/chunks/hooks2.js.gz +0 -0
  4. package/dist/chunks/hooks3.js +1 -1
  5. package/dist/chunks/identificationFrame.js.gz +0 -0
  6. package/dist/chunks/index.js.gz +0 -0
  7. package/dist/chunks/index10.js.gz +0 -0
  8. package/dist/chunks/index11.js.gz +0 -0
  9. package/dist/chunks/index12.js.gz +0 -0
  10. package/dist/chunks/index13.js.gz +0 -0
  11. package/dist/chunks/index14.js.gz +0 -0
  12. package/dist/chunks/index15.js.gz +0 -0
  13. package/dist/chunks/index16.js.gz +0 -0
  14. package/dist/chunks/index17.js.gz +0 -0
  15. package/dist/chunks/index18.js.gz +0 -0
  16. package/dist/chunks/index19.js.gz +0 -0
  17. package/dist/chunks/index2.js.gz +0 -0
  18. package/dist/chunks/index20.js.gz +0 -0
  19. package/dist/chunks/index21.js.gz +0 -0
  20. package/dist/chunks/index22.js.gz +0 -0
  21. package/dist/chunks/index23.js.gz +0 -0
  22. package/dist/chunks/index24.js.gz +0 -0
  23. package/dist/chunks/index25.js.gz +0 -0
  24. package/dist/chunks/index26.js.gz +0 -0
  25. package/dist/chunks/index27.js.gz +0 -0
  26. package/dist/chunks/index28.js.gz +0 -0
  27. package/dist/chunks/index29.js.gz +0 -0
  28. package/dist/chunks/index3.js.gz +0 -0
  29. package/dist/chunks/index30.js.gz +0 -0
  30. package/dist/chunks/index31.js.gz +0 -0
  31. package/dist/chunks/index32.js.gz +0 -0
  32. package/dist/chunks/index33.js.gz +0 -0
  33. package/dist/chunks/index34.js.gz +0 -0
  34. package/dist/chunks/index35.js.gz +0 -0
  35. package/dist/chunks/index36.js.gz +0 -0
  36. package/dist/chunks/index37.js.gz +0 -0
  37. package/dist/chunks/index38.js.gz +0 -0
  38. package/dist/chunks/index39.js.gz +0 -0
  39. package/dist/chunks/index4.js.gz +0 -0
  40. package/dist/chunks/index40.js.gz +0 -0
  41. package/dist/chunks/index41.js.gz +0 -0
  42. package/dist/chunks/index42.js +1 -1
  43. package/dist/chunks/index44.js.gz +0 -0
  44. package/dist/chunks/index45.js.gz +0 -0
  45. package/dist/chunks/index5.js.gz +0 -0
  46. package/dist/chunks/index6.js.gz +0 -0
  47. package/dist/chunks/index7.js.gz +0 -0
  48. package/dist/chunks/index8.js.gz +0 -0
  49. package/dist/chunks/index9.js.gz +0 -0
  50. package/dist/chunks/lib.js.gz +0 -0
  51. package/dist/chunks/mxcad.js.gz +0 -0
  52. package/dist/chunks/mxdraw.js.gz +0 -0
  53. package/dist/chunks/useMultilineTextDialog.js +1 -1
  54. package/dist/index.cjs.gz +0 -0
  55. package/dist/index.d.ts +2385 -22
  56. package/dist/index.js +5 -4
  57. package/dist/index.umd.js.gz +0 -0
  58. package/dist/mxcad.d.ts +153 -127
  59. package/dist/mxcadAppAssets/mxServerConfig.json.gz +0 -0
  60. package/dist/mxcadAppAssets/wasm/2d/mxdrawassembly_min.js.gz +0 -0
  61. package/dist/mxcadAppAssets/wasm/2d/mxdrawassembly_min.wasm.gz +0 -0
  62. package/dist/mxcadAppAssets/wasm/2d-st/mxdrawassembly_min.js.gz +0 -0
  63. package/dist/mxcadAppAssets/wasm/2d-st/mxdrawassembly_minst.wasm.gz +0 -0
  64. package/dist/mxcadAppAssets/wasm/2d-x64/mxdrawassembly_min.js.gz +0 -0
  65. package/dist/mxcadAppAssets/wasm/2d-x64/mxdrawassembly_min.wasm.gz +0 -0
  66. package/dist/mxcadAppAssets/wasm/2d-x64-st/mxdrawassembly_min.js.gz +0 -0
  67. package/dist/mxcadAppAssets/wasm/2d-x64-st/mxdrawassembly_minst.wasm.gz +0 -0
  68. package/dist/mxdraw.d.ts +2 -2
  69. package/dist/styles/style.css.gz +0 -0
  70. package/packToolPlugin/api-map.json.d.ts +1 -0
  71. package/packToolPlugin/{index-CXnnCbjH.mjs → index-Bkyb2FxJ.mjs} +2 -1
  72. package/packToolPlugin/{index-DubbRmDj.js → index-CmQPXuBg.js} +3 -2
  73. package/packToolPlugin/rollup/index.cjs +1 -1
  74. package/packToolPlugin/rollup/index.mjs +1 -1
  75. package/packToolPlugin/shared/types/mxServerConfig.d.ts +4 -0
  76. package/packToolPlugin/vite/index.cjs +1 -1
  77. package/packToolPlugin/vite/index.mjs +1 -1
  78. package/packToolPlugin/webpack/index.cjs +1 -1
  79. package/packToolPlugin/webpack/index.mjs +1 -1
  80. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2,6 +2,8 @@
2
2
  /// <reference path="./mxdraw.d.ts" />
3
3
 
4
4
  import { App } from 'vue';
5
+ import { ColorMethod } from 'mxcad';
6
+ import { ComputedRef } from 'vue';
5
7
  import { DateInstance } from 'vuetify';
6
8
  import { DefaultsInstance } from 'vuetify';
7
9
  import { DisplayInstance } from 'vuetify';
@@ -11,10 +13,14 @@ import { IconSet } from 'vuetify';
11
13
  import { LocaleInstance } from 'vuetify';
12
14
  import { LocaleMessages } from 'vuetify';
13
15
  import { LocaleOptions } from 'vuetify';
16
+ import { McCmColor } from 'mxcad';
17
+ import { McDb } from 'mxcad';
14
18
  import { McObject } from 'mxcad';
15
19
  import { MxCADPluginSampleCode } from 'mxcad';
16
20
  import { Ref } from 'vue';
17
21
  import { ShallowRef } from 'vue';
22
+ import { Store } from 'pinia';
23
+ import { StoreDefinition } from 'pinia';
18
24
  import { ThemeInstance } from 'vuetify';
19
25
 
20
26
  declare interface AppConfig {
@@ -25,6 +31,25 @@ declare interface AppConfig {
25
31
  themeConfig?: string;
26
32
  }
27
33
 
34
+ declare type BuildPowersOf2LengthArrays<N extends number, R extends never[][]> = R[0][N] extends never ? R : BuildPowersOf2LengthArrays<N, [[...R[0], ...R[0]], ...R]>;
35
+
36
+ declare type ColorIndex = RangeOf2<0, 256> | -1;
37
+
38
+ declare type ColorType = typeof defaultColor;
39
+
40
+ declare type ConcatLargestUntilDone<N extends number, R extends never[][], B extends never[]> = B["length"] extends N ? B : [...R[0], ...B][N] extends never ? ConcatLargestUntilDone<N, R extends [R[0], ...infer U] ? U extends never[][] ? U : never : never, B> : ConcatLargestUntilDone<N, R extends [R[0], ...infer U] ? U extends never[][] ? U : never : never, [...R[0], ...B]>;
41
+
42
+ declare type CustomUploadCalllback = ((file: File) => (Promise<CustomUploadCalllbackResult> | CustomUploadCalllbackResult)) | undefined;
43
+
44
+ declare interface CustomUploadCalllbackResult {
45
+ /** 转换后的文件url链接 */
46
+ fileUrl: string;
47
+ }
48
+
49
+ declare interface CustomUploadConfig {
50
+ callback: CustomUploadCalllback;
51
+ }
52
+
28
53
  declare interface CutBox {
29
54
  imgBase64: string;
30
55
  param: CutBoxParam;
@@ -40,6 +65,21 @@ declare interface CutBoxParam {
40
65
  bd_pt2_y: string;
41
66
  }
42
67
 
68
+ declare const defaultColor: {
69
+ color: string;
70
+ name: string;
71
+ index: ColorIndex;
72
+ method: ColorMethod;
73
+ n: number;
74
+ };
75
+
76
+ declare const defaultLineType: {
77
+ name: string;
78
+ explain: string;
79
+ appearance: string;
80
+ id: number;
81
+ };
82
+
43
83
  /**
44
84
  * 事件总线类
45
85
  */
@@ -73,6 +113,16 @@ declare class EventBus<EventMap extends Record<string, any>> {
73
113
  count<E extends keyof EventMap>(event: E): number;
74
114
  }
75
115
 
116
+ declare interface JSONLineType {
117
+ name: string;
118
+ comments: string;
119
+ id: number;
120
+ }
121
+
122
+ declare type LineType = typeof defaultLineType & {
123
+ value?: null | string;
124
+ };
125
+
76
126
  declare class MxCADApp extends MxCADEvents {
77
127
  setStaticAssetPath(url: string): void;
78
128
  getStaticAssetPath(): string;
@@ -81,6 +131,8 @@ declare class MxCADApp extends MxCADEvents {
81
131
  initPrintConfig(config: MxCADPrintCallConfig): void;
82
132
  /** 设置剪切图纸设置和回调 */
83
133
  initCutConfig(config: MxCADCutCallConfig): void;
134
+ /** 设置自定义上传设置和回调 */
135
+ initCustomUploadConfig(config: CustomUploadConfig): void;
84
136
  /** 获取mxcad-app使用的vuetify实例 */
85
137
  getVuetify(): Promise<{
86
138
  install: (app: App) => void;
@@ -175,6 +227,7 @@ export declare let mxcadApp: MxCADApp;
175
227
  declare namespace mxcadApp_2 {
176
228
  export {
177
229
  MxCADView,
230
+ store,
178
231
  mxcadApp
179
232
  }
180
233
  }
@@ -253,6 +306,2316 @@ declare interface MxCADViewConfig {
253
306
  fetchAttributes?: number;
254
307
  }
255
308
 
309
+ declare type RangeOf<N extends number> = Partial<TupleOf<unknown, N>>["length"];
310
+
311
+ /** 限制数值范围 */
312
+ declare type RangeOf2<From extends number, To extends number> = Exclude<RangeOf<To>, RangeOf<From>> | From;
313
+
314
+ declare type Replace<R extends any[], T> = {
315
+ [K in keyof R]: T;
316
+ };
317
+
318
+ export declare namespace store {
319
+ export {
320
+ useColor,
321
+ useLayer,
322
+ useLineType
323
+ }
324
+ }
325
+
326
+ declare type TupleOf<T, N extends number> = number extends N ? T[] : {
327
+ [K in N]: BuildPowersOf2LengthArrays<K, [[never]]> extends infer U ? U extends never[][] ? Replace<ConcatLargestUntilDone<K, U, []>, T> : never : never;
328
+ }[N];
329
+
330
+ declare const useColor: StoreDefinition<"color", Pick<{
331
+ colorIndexList: ComputedRef< {
332
+ color: string;
333
+ name: string;
334
+ index: ColorIndex;
335
+ method: ColorMethod;
336
+ n: number;
337
+ }[]>;
338
+ colorSelectList: Ref<{
339
+ color: string;
340
+ name: string;
341
+ index: ColorIndex;
342
+ method: ColorMethod;
343
+ n: number;
344
+ }[], {
345
+ color: string;
346
+ name: string;
347
+ index: ColorIndex;
348
+ method: ColorMethod;
349
+ n: number;
350
+ }[] | {
351
+ color: string;
352
+ name: string;
353
+ index: ColorIndex;
354
+ method: ColorMethod;
355
+ n: number;
356
+ }[]>;
357
+ currentSelectColor: Ref<{
358
+ color: string;
359
+ name: string;
360
+ index: ColorIndex;
361
+ method: ColorMethod;
362
+ n: number;
363
+ } | undefined, {
364
+ color: string;
365
+ name: string;
366
+ index: ColorIndex;
367
+ method: ColorMethod;
368
+ n: number;
369
+ } | undefined>;
370
+ initColorIndexList: () => void;
371
+ createColor: (options?: Partial<ColorType>) => {
372
+ color: string;
373
+ name: string;
374
+ index: ColorIndex;
375
+ method: ColorMethod;
376
+ n: number;
377
+ };
378
+ toMcCmColor: (color: ColorType) => McCmColor;
379
+ getMcColorToColorInfo: (mcColor: McCmColor, getColorsList?: () => {
380
+ color: string;
381
+ name: string;
382
+ index: ColorIndex;
383
+ method: ColorMethod;
384
+ n: number;
385
+ }[]) => {
386
+ color: string;
387
+ name: string;
388
+ index: ColorIndex;
389
+ method: ColorMethod;
390
+ n: number;
391
+ };
392
+ }, "colorSelectList" | "currentSelectColor">, Pick<{
393
+ colorIndexList: ComputedRef< {
394
+ color: string;
395
+ name: string;
396
+ index: ColorIndex;
397
+ method: ColorMethod;
398
+ n: number;
399
+ }[]>;
400
+ colorSelectList: Ref<{
401
+ color: string;
402
+ name: string;
403
+ index: ColorIndex;
404
+ method: ColorMethod;
405
+ n: number;
406
+ }[], {
407
+ color: string;
408
+ name: string;
409
+ index: ColorIndex;
410
+ method: ColorMethod;
411
+ n: number;
412
+ }[] | {
413
+ color: string;
414
+ name: string;
415
+ index: ColorIndex;
416
+ method: ColorMethod;
417
+ n: number;
418
+ }[]>;
419
+ currentSelectColor: Ref<{
420
+ color: string;
421
+ name: string;
422
+ index: ColorIndex;
423
+ method: ColorMethod;
424
+ n: number;
425
+ } | undefined, {
426
+ color: string;
427
+ name: string;
428
+ index: ColorIndex;
429
+ method: ColorMethod;
430
+ n: number;
431
+ } | undefined>;
432
+ initColorIndexList: () => void;
433
+ createColor: (options?: Partial<ColorType>) => {
434
+ color: string;
435
+ name: string;
436
+ index: ColorIndex;
437
+ method: ColorMethod;
438
+ n: number;
439
+ };
440
+ toMcCmColor: (color: ColorType) => McCmColor;
441
+ getMcColorToColorInfo: (mcColor: McCmColor, getColorsList?: () => {
442
+ color: string;
443
+ name: string;
444
+ index: ColorIndex;
445
+ method: ColorMethod;
446
+ n: number;
447
+ }[]) => {
448
+ color: string;
449
+ name: string;
450
+ index: ColorIndex;
451
+ method: ColorMethod;
452
+ n: number;
453
+ };
454
+ }, "colorIndexList">, Pick<{
455
+ colorIndexList: ComputedRef< {
456
+ color: string;
457
+ name: string;
458
+ index: ColorIndex;
459
+ method: ColorMethod;
460
+ n: number;
461
+ }[]>;
462
+ colorSelectList: Ref<{
463
+ color: string;
464
+ name: string;
465
+ index: ColorIndex;
466
+ method: ColorMethod;
467
+ n: number;
468
+ }[], {
469
+ color: string;
470
+ name: string;
471
+ index: ColorIndex;
472
+ method: ColorMethod;
473
+ n: number;
474
+ }[] | {
475
+ color: string;
476
+ name: string;
477
+ index: ColorIndex;
478
+ method: ColorMethod;
479
+ n: number;
480
+ }[]>;
481
+ currentSelectColor: Ref<{
482
+ color: string;
483
+ name: string;
484
+ index: ColorIndex;
485
+ method: ColorMethod;
486
+ n: number;
487
+ } | undefined, {
488
+ color: string;
489
+ name: string;
490
+ index: ColorIndex;
491
+ method: ColorMethod;
492
+ n: number;
493
+ } | undefined>;
494
+ initColorIndexList: () => void;
495
+ createColor: (options?: Partial<ColorType>) => {
496
+ color: string;
497
+ name: string;
498
+ index: ColorIndex;
499
+ method: ColorMethod;
500
+ n: number;
501
+ };
502
+ toMcCmColor: (color: ColorType) => McCmColor;
503
+ getMcColorToColorInfo: (mcColor: McCmColor, getColorsList?: () => {
504
+ color: string;
505
+ name: string;
506
+ index: ColorIndex;
507
+ method: ColorMethod;
508
+ n: number;
509
+ }[]) => {
510
+ color: string;
511
+ name: string;
512
+ index: ColorIndex;
513
+ method: ColorMethod;
514
+ n: number;
515
+ };
516
+ }, "initColorIndexList" | "createColor" | "toMcCmColor" | "getMcColorToColorInfo">>;
517
+
518
+ declare const useLayer: () => Store<"layer", Pick<{
519
+ /** 数据列表 */
520
+ list: Ref<{
521
+ id: number;
522
+ name: string;
523
+ visible: boolean;
524
+ freeze: boolean;
525
+ lock: boolean;
526
+ print: boolean;
527
+ status: boolean;
528
+ color: {
529
+ color: string;
530
+ name: string;
531
+ index: ColorIndex;
532
+ method: ColorMethod;
533
+ n: number;
534
+ };
535
+ lineType: {
536
+ name: string;
537
+ explain: string;
538
+ appearance: string;
539
+ id: number;
540
+ value?: null | string | undefined;
541
+ };
542
+ lineWeight: McDb.LineWeight;
543
+ }[], {
544
+ id: number;
545
+ name: string;
546
+ visible: boolean;
547
+ freeze: boolean;
548
+ lock: boolean;
549
+ print: boolean;
550
+ status: boolean;
551
+ color: {
552
+ color: string;
553
+ name: string;
554
+ index: ColorIndex;
555
+ method: ColorMethod;
556
+ n: number;
557
+ };
558
+ lineType: {
559
+ name: string;
560
+ explain: string;
561
+ appearance: string;
562
+ id: number;
563
+ value?: null | string | undefined;
564
+ };
565
+ lineWeight: McDb.LineWeight;
566
+ }[] | {
567
+ id: number;
568
+ name: string;
569
+ visible: boolean;
570
+ freeze: boolean;
571
+ lock: boolean;
572
+ print: boolean;
573
+ status: boolean;
574
+ color: {
575
+ color: string;
576
+ name: string;
577
+ index: ColorIndex;
578
+ method: ColorMethod;
579
+ n: number;
580
+ };
581
+ lineType: {
582
+ name: string;
583
+ explain: string;
584
+ appearance: string;
585
+ id: number;
586
+ value?: null | string | undefined;
587
+ };
588
+ lineWeight: McDb.LineWeight;
589
+ }[]>;
590
+ /** 选中索引 */
591
+ index: Ref<number | number[], number | number[]>;
592
+ currentLayer: Ref<{
593
+ id: number;
594
+ name: string;
595
+ visible: boolean;
596
+ freeze: boolean;
597
+ lock: boolean;
598
+ print: boolean;
599
+ status: boolean;
600
+ color: {
601
+ color: string;
602
+ name: string;
603
+ index: ColorIndex;
604
+ method: ColorMethod;
605
+ n: number;
606
+ };
607
+ lineType: {
608
+ name: string;
609
+ explain: string;
610
+ appearance: string;
611
+ id: number;
612
+ value?: null | string | undefined;
613
+ };
614
+ lineWeight: McDb.LineWeight;
615
+ } | undefined, {
616
+ id: number;
617
+ name: string;
618
+ visible: boolean;
619
+ freeze: boolean;
620
+ lock: boolean;
621
+ print: boolean;
622
+ status: boolean;
623
+ color: {
624
+ color: string;
625
+ name: string;
626
+ index: ColorIndex;
627
+ method: ColorMethod;
628
+ n: number;
629
+ };
630
+ lineType: {
631
+ name: string;
632
+ explain: string;
633
+ appearance: string;
634
+ id: number;
635
+ value?: null | string | undefined;
636
+ };
637
+ lineWeight: McDb.LineWeight;
638
+ } | undefined>;
639
+ /** 根ID */
640
+ rootId: ComputedRef<number>;
641
+ /** 设置索引 */
642
+ setIndex: (i: number | number[] | Ref<number | number[], number | number[]>) => void;
643
+ getIndex: (_index?: ({
644
+ id: number;
645
+ name: string;
646
+ visible: boolean;
647
+ freeze: boolean;
648
+ lock: boolean;
649
+ print: boolean;
650
+ status: boolean;
651
+ color: {
652
+ color: string;
653
+ name: string;
654
+ index: ColorIndex;
655
+ method: ColorMethod;
656
+ n: number;
657
+ };
658
+ lineType: {
659
+ name: string;
660
+ explain: string;
661
+ appearance: string;
662
+ id: number;
663
+ value?: null | string | undefined;
664
+ };
665
+ lineWeight: McDb.LineWeight;
666
+ } | {
667
+ id: number;
668
+ name: string;
669
+ visible: boolean;
670
+ freeze: boolean;
671
+ lock: boolean;
672
+ print: boolean;
673
+ status: boolean;
674
+ color: {
675
+ color: string;
676
+ name: string;
677
+ index: ColorIndex;
678
+ method: ColorMethod;
679
+ n: number;
680
+ };
681
+ lineType: {
682
+ name: string;
683
+ explain: string;
684
+ appearance: string;
685
+ id: number;
686
+ value?: null | string | undefined;
687
+ };
688
+ lineWeight: McDb.LineWeight;
689
+ }[] | Ref<{
690
+ id: number;
691
+ name: string;
692
+ visible: boolean;
693
+ freeze: boolean;
694
+ lock: boolean;
695
+ print: boolean;
696
+ status: boolean;
697
+ color: {
698
+ color: string;
699
+ name: string;
700
+ index: ColorIndex;
701
+ method: ColorMethod;
702
+ n: number;
703
+ };
704
+ lineType: {
705
+ name: string;
706
+ explain: string;
707
+ appearance: string;
708
+ id: number;
709
+ value?: null | string | undefined;
710
+ };
711
+ lineWeight: McDb.LineWeight;
712
+ } | {
713
+ id: number;
714
+ name: string;
715
+ visible: boolean;
716
+ freeze: boolean;
717
+ lock: boolean;
718
+ print: boolean;
719
+ status: boolean;
720
+ color: {
721
+ color: string;
722
+ name: string;
723
+ index: ColorIndex;
724
+ method: ColorMethod;
725
+ n: number;
726
+ };
727
+ lineType: {
728
+ name: string;
729
+ explain: string;
730
+ appearance: string;
731
+ id: number;
732
+ value?: null | string | undefined;
733
+ };
734
+ lineWeight: McDb.LineWeight;
735
+ }[], {
736
+ id: number;
737
+ name: string;
738
+ visible: boolean;
739
+ freeze: boolean;
740
+ lock: boolean;
741
+ print: boolean;
742
+ status: boolean;
743
+ color: {
744
+ color: string;
745
+ name: string;
746
+ index: ColorIndex;
747
+ method: ColorMethod;
748
+ n: number;
749
+ };
750
+ lineType: {
751
+ name: string;
752
+ explain: string;
753
+ appearance: string;
754
+ id: number;
755
+ value?: null | string | undefined;
756
+ };
757
+ lineWeight: McDb.LineWeight;
758
+ } | {
759
+ id: number;
760
+ name: string;
761
+ visible: boolean;
762
+ freeze: boolean;
763
+ lock: boolean;
764
+ print: boolean;
765
+ status: boolean;
766
+ color: {
767
+ color: string;
768
+ name: string;
769
+ index: ColorIndex;
770
+ method: ColorMethod;
771
+ n: number;
772
+ };
773
+ lineType: {
774
+ name: string;
775
+ explain: string;
776
+ appearance: string;
777
+ id: number;
778
+ value?: null | string | undefined;
779
+ };
780
+ lineWeight: McDb.LineWeight;
781
+ }[]>) | (number | number[] | Ref<number | number[], number | number[]>)) => number | number[];
782
+ /** 添加 */
783
+ add: (layerItem?: {
784
+ id: number;
785
+ name: string;
786
+ visible: boolean;
787
+ freeze: boolean;
788
+ lock: boolean;
789
+ print: boolean;
790
+ status: boolean;
791
+ color: {
792
+ color: string;
793
+ name: string;
794
+ index: ColorIndex;
795
+ method: ColorMethod;
796
+ n: number;
797
+ };
798
+ lineType: {
799
+ name: string;
800
+ explain: string;
801
+ appearance: string;
802
+ id: number;
803
+ value?: null | string | undefined;
804
+ };
805
+ lineWeight: McDb.LineWeight;
806
+ }) => {
807
+ id: number;
808
+ name: string;
809
+ visible: boolean;
810
+ freeze: boolean;
811
+ lock: boolean;
812
+ print: boolean;
813
+ status: boolean;
814
+ color: {
815
+ color: string;
816
+ name: string;
817
+ index: ColorIndex;
818
+ method: ColorMethod;
819
+ n: number;
820
+ };
821
+ lineType: {
822
+ name: string;
823
+ explain: string;
824
+ appearance: string;
825
+ id: number;
826
+ value?: null | string | undefined;
827
+ };
828
+ lineWeight: McDb.LineWeight;
829
+ };
830
+ /** 创建 */
831
+ create: (options?: Partial<{
832
+ id: number;
833
+ name: string;
834
+ visible: boolean;
835
+ freeze: boolean;
836
+ lock: boolean;
837
+ print: boolean;
838
+ status: boolean;
839
+ color: {
840
+ color: string;
841
+ name: string;
842
+ index: ColorIndex;
843
+ method: ColorMethod;
844
+ n: number;
845
+ };
846
+ lineType: {
847
+ name: string;
848
+ explain: string;
849
+ appearance: string;
850
+ id: number;
851
+ value?: null | string | undefined;
852
+ };
853
+ lineWeight: McDb.LineWeight;
854
+ }>) => {
855
+ id: number;
856
+ name: string;
857
+ visible: boolean;
858
+ freeze: boolean;
859
+ lock: boolean;
860
+ print: boolean;
861
+ status: boolean;
862
+ color: {
863
+ color: string;
864
+ name: string;
865
+ index: ColorIndex;
866
+ method: ColorMethod;
867
+ n: number;
868
+ };
869
+ lineType: {
870
+ name: string;
871
+ explain: string;
872
+ appearance: string;
873
+ id: number;
874
+ value?: null | string | undefined;
875
+ };
876
+ lineWeight: McDb.LineWeight;
877
+ };
878
+ /** 删除 */
879
+ remove: (layers?: number | {
880
+ id: number;
881
+ name: string;
882
+ visible: boolean;
883
+ freeze: boolean;
884
+ lock: boolean;
885
+ print: boolean;
886
+ status: boolean;
887
+ color: {
888
+ color: string;
889
+ name: string;
890
+ index: ColorIndex;
891
+ method: ColorMethod;
892
+ n: number;
893
+ };
894
+ lineType: {
895
+ name: string;
896
+ explain: string;
897
+ appearance: string;
898
+ id: number;
899
+ value?: null | string | undefined;
900
+ };
901
+ lineWeight: McDb.LineWeight;
902
+ } | (number | {
903
+ id: number;
904
+ name: string;
905
+ visible: boolean;
906
+ freeze: boolean;
907
+ lock: boolean;
908
+ print: boolean;
909
+ status: boolean;
910
+ color: {
911
+ color: string;
912
+ name: string;
913
+ index: ColorIndex;
914
+ method: ColorMethod;
915
+ n: number;
916
+ };
917
+ lineType: {
918
+ name: string;
919
+ explain: string;
920
+ appearance: string;
921
+ id: number;
922
+ value?: null | string | undefined;
923
+ };
924
+ lineWeight: McDb.LineWeight;
925
+ })[] | Ref<number | {
926
+ id: number;
927
+ name: string;
928
+ visible: boolean;
929
+ freeze: boolean;
930
+ lock: boolean;
931
+ print: boolean;
932
+ status: boolean;
933
+ color: {
934
+ color: string;
935
+ name: string;
936
+ index: ColorIndex;
937
+ method: ColorMethod;
938
+ n: number;
939
+ };
940
+ lineType: {
941
+ name: string;
942
+ explain: string;
943
+ appearance: string;
944
+ id: number;
945
+ value?: null | string | undefined;
946
+ };
947
+ lineWeight: McDb.LineWeight;
948
+ } | (number | {
949
+ id: number;
950
+ name: string;
951
+ visible: boolean;
952
+ freeze: boolean;
953
+ lock: boolean;
954
+ print: boolean;
955
+ status: boolean;
956
+ color: {
957
+ color: string;
958
+ name: string;
959
+ index: ColorIndex;
960
+ method: ColorMethod;
961
+ n: number;
962
+ };
963
+ lineType: {
964
+ name: string;
965
+ explain: string;
966
+ appearance: string;
967
+ id: number;
968
+ value?: null | string | undefined;
969
+ };
970
+ lineWeight: McDb.LineWeight;
971
+ })[], number | {
972
+ id: number;
973
+ name: string;
974
+ visible: boolean;
975
+ freeze: boolean;
976
+ lock: boolean;
977
+ print: boolean;
978
+ status: boolean;
979
+ color: {
980
+ color: string;
981
+ name: string;
982
+ index: ColorIndex;
983
+ method: ColorMethod;
984
+ n: number;
985
+ };
986
+ lineType: {
987
+ name: string;
988
+ explain: string;
989
+ appearance: string;
990
+ id: number;
991
+ value?: null | string | undefined;
992
+ };
993
+ lineWeight: McDb.LineWeight;
994
+ } | (number | {
995
+ id: number;
996
+ name: string;
997
+ visible: boolean;
998
+ freeze: boolean;
999
+ lock: boolean;
1000
+ print: boolean;
1001
+ status: boolean;
1002
+ color: {
1003
+ color: string;
1004
+ name: string;
1005
+ index: ColorIndex;
1006
+ method: ColorMethod;
1007
+ n: number;
1008
+ };
1009
+ lineType: {
1010
+ name: string;
1011
+ explain: string;
1012
+ appearance: string;
1013
+ id: number;
1014
+ value?: null | string | undefined;
1015
+ };
1016
+ lineWeight: McDb.LineWeight;
1017
+ })[]>, type?: "index" | "id" | "this") => {
1018
+ id: number;
1019
+ name: string;
1020
+ visible: boolean;
1021
+ freeze: boolean;
1022
+ lock: boolean;
1023
+ print: boolean;
1024
+ status: boolean;
1025
+ color: {
1026
+ color: string;
1027
+ name: string;
1028
+ index: ColorIndex;
1029
+ method: ColorMethod;
1030
+ n: number;
1031
+ };
1032
+ lineType: {
1033
+ name: string;
1034
+ explain: string;
1035
+ appearance: string;
1036
+ id: number;
1037
+ value?: null | string | undefined;
1038
+ };
1039
+ lineWeight: McDb.LineWeight;
1040
+ }[] | undefined;
1041
+ /** 切换状态 */
1042
+ toggle: (key: keyof Pick<{
1043
+ id: number;
1044
+ name: string;
1045
+ visible: boolean;
1046
+ freeze: boolean;
1047
+ lock: boolean;
1048
+ print: boolean;
1049
+ status: boolean;
1050
+ color: {
1051
+ color: string;
1052
+ name: string;
1053
+ index: ColorIndex;
1054
+ method: ColorMethod;
1055
+ n: number;
1056
+ };
1057
+ lineType: {
1058
+ name: string;
1059
+ explain: string;
1060
+ appearance: string;
1061
+ id: number;
1062
+ value?: null | string | undefined;
1063
+ };
1064
+ lineWeight: McDb.LineWeight;
1065
+ }, "freeze" | "lock" | "print" | "visible">, i?: number | number[] | Ref<number | number[], number | number[]>) => boolean | (boolean | undefined)[] | undefined;
1066
+ /** 设置值 */
1067
+ setValue: (key: "id" | "color" | "name" | "lineWeight" | "visible" | "lineType" | "freeze" | "lock" | "print" | "status", v: string | number | boolean | {
1068
+ color: string;
1069
+ name: string;
1070
+ index: ColorIndex;
1071
+ method: ColorMethod;
1072
+ n: number;
1073
+ } | {
1074
+ name: string;
1075
+ explain: string;
1076
+ appearance: string;
1077
+ id: number;
1078
+ value?: null | string | undefined;
1079
+ } | (string | number | boolean | {
1080
+ color: string;
1081
+ name: string;
1082
+ index: ColorIndex;
1083
+ method: ColorMethod;
1084
+ n: number;
1085
+ } | {
1086
+ name: string;
1087
+ explain: string;
1088
+ appearance: string;
1089
+ id: number;
1090
+ value?: null | string | undefined;
1091
+ })[] | Ref<string | number | boolean | {
1092
+ color: string;
1093
+ name: string;
1094
+ index: ColorIndex;
1095
+ method: ColorMethod;
1096
+ n: number;
1097
+ } | {
1098
+ name: string;
1099
+ explain: string;
1100
+ appearance: string;
1101
+ id: number;
1102
+ value?: null | string | undefined;
1103
+ } | (string | number | boolean | {
1104
+ color: string;
1105
+ name: string;
1106
+ index: ColorIndex;
1107
+ method: ColorMethod;
1108
+ n: number;
1109
+ } | {
1110
+ name: string;
1111
+ explain: string;
1112
+ appearance: string;
1113
+ id: number;
1114
+ value?: null | string | undefined;
1115
+ })[], string | number | boolean | {
1116
+ color: string;
1117
+ name: string;
1118
+ index: ColorIndex;
1119
+ method: ColorMethod;
1120
+ n: number;
1121
+ } | {
1122
+ name: string;
1123
+ explain: string;
1124
+ appearance: string;
1125
+ id: number;
1126
+ value?: null | string | undefined;
1127
+ } | (string | number | boolean | {
1128
+ color: string;
1129
+ name: string;
1130
+ index: ColorIndex;
1131
+ method: ColorMethod;
1132
+ n: number;
1133
+ } | {
1134
+ name: string;
1135
+ explain: string;
1136
+ appearance: string;
1137
+ id: number;
1138
+ value?: null | string | undefined;
1139
+ })[]>, i?: number | number[] | Ref<number | number[], number | number[]>, isSave?: boolean) => (string | number | boolean | {
1140
+ color: string;
1141
+ name: string;
1142
+ index: ColorIndex;
1143
+ method: ColorMethod;
1144
+ n: number;
1145
+ } | {
1146
+ name: string;
1147
+ explain: string;
1148
+ appearance: string;
1149
+ id: number;
1150
+ value?: null | string | undefined;
1151
+ })[];
1152
+ /** 置于当前状态 */
1153
+ putCurrent: (val?: {
1154
+ id: number;
1155
+ name: string;
1156
+ visible: boolean;
1157
+ freeze: boolean;
1158
+ lock: boolean;
1159
+ print: boolean;
1160
+ status: boolean;
1161
+ color: {
1162
+ color: string;
1163
+ name: string;
1164
+ index: ColorIndex;
1165
+ method: ColorMethod;
1166
+ n: number;
1167
+ };
1168
+ lineType: {
1169
+ name: string;
1170
+ explain: string;
1171
+ appearance: string;
1172
+ id: number;
1173
+ value?: null | string | undefined;
1174
+ };
1175
+ lineWeight: McDb.LineWeight;
1176
+ } | number, isSave?: boolean) => void;
1177
+ parseJSON: (jsonText?: string) => void;
1178
+ stringifyJSON: () => string;
1179
+ initLayerList: () => void;
1180
+ initCurrentLayer: (layerName?: string) => void;
1181
+ setLayerList: (jsonText: string) => Promise<void>;
1182
+ /** 恢复图层状态记录 */
1183
+ recoveryLayerStateHistory: () => void;
1184
+ /** 是否选中 */
1185
+ isSelected: (i: number) => boolean;
1186
+ }, "index" | "list" | "currentLayer">, Pick<{
1187
+ /** 数据列表 */
1188
+ list: Ref<{
1189
+ id: number;
1190
+ name: string;
1191
+ visible: boolean;
1192
+ freeze: boolean;
1193
+ lock: boolean;
1194
+ print: boolean;
1195
+ status: boolean;
1196
+ color: {
1197
+ color: string;
1198
+ name: string;
1199
+ index: ColorIndex;
1200
+ method: ColorMethod;
1201
+ n: number;
1202
+ };
1203
+ lineType: {
1204
+ name: string;
1205
+ explain: string;
1206
+ appearance: string;
1207
+ id: number;
1208
+ value?: null | string | undefined;
1209
+ };
1210
+ lineWeight: McDb.LineWeight;
1211
+ }[], {
1212
+ id: number;
1213
+ name: string;
1214
+ visible: boolean;
1215
+ freeze: boolean;
1216
+ lock: boolean;
1217
+ print: boolean;
1218
+ status: boolean;
1219
+ color: {
1220
+ color: string;
1221
+ name: string;
1222
+ index: ColorIndex;
1223
+ method: ColorMethod;
1224
+ n: number;
1225
+ };
1226
+ lineType: {
1227
+ name: string;
1228
+ explain: string;
1229
+ appearance: string;
1230
+ id: number;
1231
+ value?: null | string | undefined;
1232
+ };
1233
+ lineWeight: McDb.LineWeight;
1234
+ }[] | {
1235
+ id: number;
1236
+ name: string;
1237
+ visible: boolean;
1238
+ freeze: boolean;
1239
+ lock: boolean;
1240
+ print: boolean;
1241
+ status: boolean;
1242
+ color: {
1243
+ color: string;
1244
+ name: string;
1245
+ index: ColorIndex;
1246
+ method: ColorMethod;
1247
+ n: number;
1248
+ };
1249
+ lineType: {
1250
+ name: string;
1251
+ explain: string;
1252
+ appearance: string;
1253
+ id: number;
1254
+ value?: null | string | undefined;
1255
+ };
1256
+ lineWeight: McDb.LineWeight;
1257
+ }[]>;
1258
+ /** 选中索引 */
1259
+ index: Ref<number | number[], number | number[]>;
1260
+ currentLayer: Ref<{
1261
+ id: number;
1262
+ name: string;
1263
+ visible: boolean;
1264
+ freeze: boolean;
1265
+ lock: boolean;
1266
+ print: boolean;
1267
+ status: boolean;
1268
+ color: {
1269
+ color: string;
1270
+ name: string;
1271
+ index: ColorIndex;
1272
+ method: ColorMethod;
1273
+ n: number;
1274
+ };
1275
+ lineType: {
1276
+ name: string;
1277
+ explain: string;
1278
+ appearance: string;
1279
+ id: number;
1280
+ value?: null | string | undefined;
1281
+ };
1282
+ lineWeight: McDb.LineWeight;
1283
+ } | undefined, {
1284
+ id: number;
1285
+ name: string;
1286
+ visible: boolean;
1287
+ freeze: boolean;
1288
+ lock: boolean;
1289
+ print: boolean;
1290
+ status: boolean;
1291
+ color: {
1292
+ color: string;
1293
+ name: string;
1294
+ index: ColorIndex;
1295
+ method: ColorMethod;
1296
+ n: number;
1297
+ };
1298
+ lineType: {
1299
+ name: string;
1300
+ explain: string;
1301
+ appearance: string;
1302
+ id: number;
1303
+ value?: null | string | undefined;
1304
+ };
1305
+ lineWeight: McDb.LineWeight;
1306
+ } | undefined>;
1307
+ /** 根ID */
1308
+ rootId: ComputedRef<number>;
1309
+ /** 设置索引 */
1310
+ setIndex: (i: number | number[] | Ref<number | number[], number | number[]>) => void;
1311
+ getIndex: (_index?: ({
1312
+ id: number;
1313
+ name: string;
1314
+ visible: boolean;
1315
+ freeze: boolean;
1316
+ lock: boolean;
1317
+ print: boolean;
1318
+ status: boolean;
1319
+ color: {
1320
+ color: string;
1321
+ name: string;
1322
+ index: ColorIndex;
1323
+ method: ColorMethod;
1324
+ n: number;
1325
+ };
1326
+ lineType: {
1327
+ name: string;
1328
+ explain: string;
1329
+ appearance: string;
1330
+ id: number;
1331
+ value?: null | string | undefined;
1332
+ };
1333
+ lineWeight: McDb.LineWeight;
1334
+ } | {
1335
+ id: number;
1336
+ name: string;
1337
+ visible: boolean;
1338
+ freeze: boolean;
1339
+ lock: boolean;
1340
+ print: boolean;
1341
+ status: boolean;
1342
+ color: {
1343
+ color: string;
1344
+ name: string;
1345
+ index: ColorIndex;
1346
+ method: ColorMethod;
1347
+ n: number;
1348
+ };
1349
+ lineType: {
1350
+ name: string;
1351
+ explain: string;
1352
+ appearance: string;
1353
+ id: number;
1354
+ value?: null | string | undefined;
1355
+ };
1356
+ lineWeight: McDb.LineWeight;
1357
+ }[] | Ref<{
1358
+ id: number;
1359
+ name: string;
1360
+ visible: boolean;
1361
+ freeze: boolean;
1362
+ lock: boolean;
1363
+ print: boolean;
1364
+ status: boolean;
1365
+ color: {
1366
+ color: string;
1367
+ name: string;
1368
+ index: ColorIndex;
1369
+ method: ColorMethod;
1370
+ n: number;
1371
+ };
1372
+ lineType: {
1373
+ name: string;
1374
+ explain: string;
1375
+ appearance: string;
1376
+ id: number;
1377
+ value?: null | string | undefined;
1378
+ };
1379
+ lineWeight: McDb.LineWeight;
1380
+ } | {
1381
+ id: number;
1382
+ name: string;
1383
+ visible: boolean;
1384
+ freeze: boolean;
1385
+ lock: boolean;
1386
+ print: boolean;
1387
+ status: boolean;
1388
+ color: {
1389
+ color: string;
1390
+ name: string;
1391
+ index: ColorIndex;
1392
+ method: ColorMethod;
1393
+ n: number;
1394
+ };
1395
+ lineType: {
1396
+ name: string;
1397
+ explain: string;
1398
+ appearance: string;
1399
+ id: number;
1400
+ value?: null | string | undefined;
1401
+ };
1402
+ lineWeight: McDb.LineWeight;
1403
+ }[], {
1404
+ id: number;
1405
+ name: string;
1406
+ visible: boolean;
1407
+ freeze: boolean;
1408
+ lock: boolean;
1409
+ print: boolean;
1410
+ status: boolean;
1411
+ color: {
1412
+ color: string;
1413
+ name: string;
1414
+ index: ColorIndex;
1415
+ method: ColorMethod;
1416
+ n: number;
1417
+ };
1418
+ lineType: {
1419
+ name: string;
1420
+ explain: string;
1421
+ appearance: string;
1422
+ id: number;
1423
+ value?: null | string | undefined;
1424
+ };
1425
+ lineWeight: McDb.LineWeight;
1426
+ } | {
1427
+ id: number;
1428
+ name: string;
1429
+ visible: boolean;
1430
+ freeze: boolean;
1431
+ lock: boolean;
1432
+ print: boolean;
1433
+ status: boolean;
1434
+ color: {
1435
+ color: string;
1436
+ name: string;
1437
+ index: ColorIndex;
1438
+ method: ColorMethod;
1439
+ n: number;
1440
+ };
1441
+ lineType: {
1442
+ name: string;
1443
+ explain: string;
1444
+ appearance: string;
1445
+ id: number;
1446
+ value?: null | string | undefined;
1447
+ };
1448
+ lineWeight: McDb.LineWeight;
1449
+ }[]>) | (number | number[] | Ref<number | number[], number | number[]>)) => number | number[];
1450
+ /** 添加 */
1451
+ add: (layerItem?: {
1452
+ id: number;
1453
+ name: string;
1454
+ visible: boolean;
1455
+ freeze: boolean;
1456
+ lock: boolean;
1457
+ print: boolean;
1458
+ status: boolean;
1459
+ color: {
1460
+ color: string;
1461
+ name: string;
1462
+ index: ColorIndex;
1463
+ method: ColorMethod;
1464
+ n: number;
1465
+ };
1466
+ lineType: {
1467
+ name: string;
1468
+ explain: string;
1469
+ appearance: string;
1470
+ id: number;
1471
+ value?: null | string | undefined;
1472
+ };
1473
+ lineWeight: McDb.LineWeight;
1474
+ }) => {
1475
+ id: number;
1476
+ name: string;
1477
+ visible: boolean;
1478
+ freeze: boolean;
1479
+ lock: boolean;
1480
+ print: boolean;
1481
+ status: boolean;
1482
+ color: {
1483
+ color: string;
1484
+ name: string;
1485
+ index: ColorIndex;
1486
+ method: ColorMethod;
1487
+ n: number;
1488
+ };
1489
+ lineType: {
1490
+ name: string;
1491
+ explain: string;
1492
+ appearance: string;
1493
+ id: number;
1494
+ value?: null | string | undefined;
1495
+ };
1496
+ lineWeight: McDb.LineWeight;
1497
+ };
1498
+ /** 创建 */
1499
+ create: (options?: Partial<{
1500
+ id: number;
1501
+ name: string;
1502
+ visible: boolean;
1503
+ freeze: boolean;
1504
+ lock: boolean;
1505
+ print: boolean;
1506
+ status: boolean;
1507
+ color: {
1508
+ color: string;
1509
+ name: string;
1510
+ index: ColorIndex;
1511
+ method: ColorMethod;
1512
+ n: number;
1513
+ };
1514
+ lineType: {
1515
+ name: string;
1516
+ explain: string;
1517
+ appearance: string;
1518
+ id: number;
1519
+ value?: null | string | undefined;
1520
+ };
1521
+ lineWeight: McDb.LineWeight;
1522
+ }>) => {
1523
+ id: number;
1524
+ name: string;
1525
+ visible: boolean;
1526
+ freeze: boolean;
1527
+ lock: boolean;
1528
+ print: boolean;
1529
+ status: boolean;
1530
+ color: {
1531
+ color: string;
1532
+ name: string;
1533
+ index: ColorIndex;
1534
+ method: ColorMethod;
1535
+ n: number;
1536
+ };
1537
+ lineType: {
1538
+ name: string;
1539
+ explain: string;
1540
+ appearance: string;
1541
+ id: number;
1542
+ value?: null | string | undefined;
1543
+ };
1544
+ lineWeight: McDb.LineWeight;
1545
+ };
1546
+ /** 删除 */
1547
+ remove: (layers?: number | {
1548
+ id: number;
1549
+ name: string;
1550
+ visible: boolean;
1551
+ freeze: boolean;
1552
+ lock: boolean;
1553
+ print: boolean;
1554
+ status: boolean;
1555
+ color: {
1556
+ color: string;
1557
+ name: string;
1558
+ index: ColorIndex;
1559
+ method: ColorMethod;
1560
+ n: number;
1561
+ };
1562
+ lineType: {
1563
+ name: string;
1564
+ explain: string;
1565
+ appearance: string;
1566
+ id: number;
1567
+ value?: null | string | undefined;
1568
+ };
1569
+ lineWeight: McDb.LineWeight;
1570
+ } | (number | {
1571
+ id: number;
1572
+ name: string;
1573
+ visible: boolean;
1574
+ freeze: boolean;
1575
+ lock: boolean;
1576
+ print: boolean;
1577
+ status: boolean;
1578
+ color: {
1579
+ color: string;
1580
+ name: string;
1581
+ index: ColorIndex;
1582
+ method: ColorMethod;
1583
+ n: number;
1584
+ };
1585
+ lineType: {
1586
+ name: string;
1587
+ explain: string;
1588
+ appearance: string;
1589
+ id: number;
1590
+ value?: null | string | undefined;
1591
+ };
1592
+ lineWeight: McDb.LineWeight;
1593
+ })[] | Ref<number | {
1594
+ id: number;
1595
+ name: string;
1596
+ visible: boolean;
1597
+ freeze: boolean;
1598
+ lock: boolean;
1599
+ print: boolean;
1600
+ status: boolean;
1601
+ color: {
1602
+ color: string;
1603
+ name: string;
1604
+ index: ColorIndex;
1605
+ method: ColorMethod;
1606
+ n: number;
1607
+ };
1608
+ lineType: {
1609
+ name: string;
1610
+ explain: string;
1611
+ appearance: string;
1612
+ id: number;
1613
+ value?: null | string | undefined;
1614
+ };
1615
+ lineWeight: McDb.LineWeight;
1616
+ } | (number | {
1617
+ id: number;
1618
+ name: string;
1619
+ visible: boolean;
1620
+ freeze: boolean;
1621
+ lock: boolean;
1622
+ print: boolean;
1623
+ status: boolean;
1624
+ color: {
1625
+ color: string;
1626
+ name: string;
1627
+ index: ColorIndex;
1628
+ method: ColorMethod;
1629
+ n: number;
1630
+ };
1631
+ lineType: {
1632
+ name: string;
1633
+ explain: string;
1634
+ appearance: string;
1635
+ id: number;
1636
+ value?: null | string | undefined;
1637
+ };
1638
+ lineWeight: McDb.LineWeight;
1639
+ })[], number | {
1640
+ id: number;
1641
+ name: string;
1642
+ visible: boolean;
1643
+ freeze: boolean;
1644
+ lock: boolean;
1645
+ print: boolean;
1646
+ status: boolean;
1647
+ color: {
1648
+ color: string;
1649
+ name: string;
1650
+ index: ColorIndex;
1651
+ method: ColorMethod;
1652
+ n: number;
1653
+ };
1654
+ lineType: {
1655
+ name: string;
1656
+ explain: string;
1657
+ appearance: string;
1658
+ id: number;
1659
+ value?: null | string | undefined;
1660
+ };
1661
+ lineWeight: McDb.LineWeight;
1662
+ } | (number | {
1663
+ id: number;
1664
+ name: string;
1665
+ visible: boolean;
1666
+ freeze: boolean;
1667
+ lock: boolean;
1668
+ print: boolean;
1669
+ status: boolean;
1670
+ color: {
1671
+ color: string;
1672
+ name: string;
1673
+ index: ColorIndex;
1674
+ method: ColorMethod;
1675
+ n: number;
1676
+ };
1677
+ lineType: {
1678
+ name: string;
1679
+ explain: string;
1680
+ appearance: string;
1681
+ id: number;
1682
+ value?: null | string | undefined;
1683
+ };
1684
+ lineWeight: McDb.LineWeight;
1685
+ })[]>, type?: "index" | "id" | "this") => {
1686
+ id: number;
1687
+ name: string;
1688
+ visible: boolean;
1689
+ freeze: boolean;
1690
+ lock: boolean;
1691
+ print: boolean;
1692
+ status: boolean;
1693
+ color: {
1694
+ color: string;
1695
+ name: string;
1696
+ index: ColorIndex;
1697
+ method: ColorMethod;
1698
+ n: number;
1699
+ };
1700
+ lineType: {
1701
+ name: string;
1702
+ explain: string;
1703
+ appearance: string;
1704
+ id: number;
1705
+ value?: null | string | undefined;
1706
+ };
1707
+ lineWeight: McDb.LineWeight;
1708
+ }[] | undefined;
1709
+ /** 切换状态 */
1710
+ toggle: (key: keyof Pick<{
1711
+ id: number;
1712
+ name: string;
1713
+ visible: boolean;
1714
+ freeze: boolean;
1715
+ lock: boolean;
1716
+ print: boolean;
1717
+ status: boolean;
1718
+ color: {
1719
+ color: string;
1720
+ name: string;
1721
+ index: ColorIndex;
1722
+ method: ColorMethod;
1723
+ n: number;
1724
+ };
1725
+ lineType: {
1726
+ name: string;
1727
+ explain: string;
1728
+ appearance: string;
1729
+ id: number;
1730
+ value?: null | string | undefined;
1731
+ };
1732
+ lineWeight: McDb.LineWeight;
1733
+ }, "freeze" | "lock" | "print" | "visible">, i?: number | number[] | Ref<number | number[], number | number[]>) => boolean | (boolean | undefined)[] | undefined;
1734
+ /** 设置值 */
1735
+ setValue: (key: "id" | "color" | "name" | "lineWeight" | "visible" | "lineType" | "freeze" | "lock" | "print" | "status", v: string | number | boolean | {
1736
+ color: string;
1737
+ name: string;
1738
+ index: ColorIndex;
1739
+ method: ColorMethod;
1740
+ n: number;
1741
+ } | {
1742
+ name: string;
1743
+ explain: string;
1744
+ appearance: string;
1745
+ id: number;
1746
+ value?: null | string | undefined;
1747
+ } | (string | number | boolean | {
1748
+ color: string;
1749
+ name: string;
1750
+ index: ColorIndex;
1751
+ method: ColorMethod;
1752
+ n: number;
1753
+ } | {
1754
+ name: string;
1755
+ explain: string;
1756
+ appearance: string;
1757
+ id: number;
1758
+ value?: null | string | undefined;
1759
+ })[] | Ref<string | number | boolean | {
1760
+ color: string;
1761
+ name: string;
1762
+ index: ColorIndex;
1763
+ method: ColorMethod;
1764
+ n: number;
1765
+ } | {
1766
+ name: string;
1767
+ explain: string;
1768
+ appearance: string;
1769
+ id: number;
1770
+ value?: null | string | undefined;
1771
+ } | (string | number | boolean | {
1772
+ color: string;
1773
+ name: string;
1774
+ index: ColorIndex;
1775
+ method: ColorMethod;
1776
+ n: number;
1777
+ } | {
1778
+ name: string;
1779
+ explain: string;
1780
+ appearance: string;
1781
+ id: number;
1782
+ value?: null | string | undefined;
1783
+ })[], string | number | boolean | {
1784
+ color: string;
1785
+ name: string;
1786
+ index: ColorIndex;
1787
+ method: ColorMethod;
1788
+ n: number;
1789
+ } | {
1790
+ name: string;
1791
+ explain: string;
1792
+ appearance: string;
1793
+ id: number;
1794
+ value?: null | string | undefined;
1795
+ } | (string | number | boolean | {
1796
+ color: string;
1797
+ name: string;
1798
+ index: ColorIndex;
1799
+ method: ColorMethod;
1800
+ n: number;
1801
+ } | {
1802
+ name: string;
1803
+ explain: string;
1804
+ appearance: string;
1805
+ id: number;
1806
+ value?: null | string | undefined;
1807
+ })[]>, i?: number | number[] | Ref<number | number[], number | number[]>, isSave?: boolean) => (string | number | boolean | {
1808
+ color: string;
1809
+ name: string;
1810
+ index: ColorIndex;
1811
+ method: ColorMethod;
1812
+ n: number;
1813
+ } | {
1814
+ name: string;
1815
+ explain: string;
1816
+ appearance: string;
1817
+ id: number;
1818
+ value?: null | string | undefined;
1819
+ })[];
1820
+ /** 置于当前状态 */
1821
+ putCurrent: (val?: {
1822
+ id: number;
1823
+ name: string;
1824
+ visible: boolean;
1825
+ freeze: boolean;
1826
+ lock: boolean;
1827
+ print: boolean;
1828
+ status: boolean;
1829
+ color: {
1830
+ color: string;
1831
+ name: string;
1832
+ index: ColorIndex;
1833
+ method: ColorMethod;
1834
+ n: number;
1835
+ };
1836
+ lineType: {
1837
+ name: string;
1838
+ explain: string;
1839
+ appearance: string;
1840
+ id: number;
1841
+ value?: null | string | undefined;
1842
+ };
1843
+ lineWeight: McDb.LineWeight;
1844
+ } | number, isSave?: boolean) => void;
1845
+ parseJSON: (jsonText?: string) => void;
1846
+ stringifyJSON: () => string;
1847
+ initLayerList: () => void;
1848
+ initCurrentLayer: (layerName?: string) => void;
1849
+ setLayerList: (jsonText: string) => Promise<void>;
1850
+ /** 恢复图层状态记录 */
1851
+ recoveryLayerStateHistory: () => void;
1852
+ /** 是否选中 */
1853
+ isSelected: (i: number) => boolean;
1854
+ }, "rootId">, Pick<{
1855
+ /** 数据列表 */
1856
+ list: Ref<{
1857
+ id: number;
1858
+ name: string;
1859
+ visible: boolean;
1860
+ freeze: boolean;
1861
+ lock: boolean;
1862
+ print: boolean;
1863
+ status: boolean;
1864
+ color: {
1865
+ color: string;
1866
+ name: string;
1867
+ index: ColorIndex;
1868
+ method: ColorMethod;
1869
+ n: number;
1870
+ };
1871
+ lineType: {
1872
+ name: string;
1873
+ explain: string;
1874
+ appearance: string;
1875
+ id: number;
1876
+ value?: null | string | undefined;
1877
+ };
1878
+ lineWeight: McDb.LineWeight;
1879
+ }[], {
1880
+ id: number;
1881
+ name: string;
1882
+ visible: boolean;
1883
+ freeze: boolean;
1884
+ lock: boolean;
1885
+ print: boolean;
1886
+ status: boolean;
1887
+ color: {
1888
+ color: string;
1889
+ name: string;
1890
+ index: ColorIndex;
1891
+ method: ColorMethod;
1892
+ n: number;
1893
+ };
1894
+ lineType: {
1895
+ name: string;
1896
+ explain: string;
1897
+ appearance: string;
1898
+ id: number;
1899
+ value?: null | string | undefined;
1900
+ };
1901
+ lineWeight: McDb.LineWeight;
1902
+ }[] | {
1903
+ id: number;
1904
+ name: string;
1905
+ visible: boolean;
1906
+ freeze: boolean;
1907
+ lock: boolean;
1908
+ print: boolean;
1909
+ status: boolean;
1910
+ color: {
1911
+ color: string;
1912
+ name: string;
1913
+ index: ColorIndex;
1914
+ method: ColorMethod;
1915
+ n: number;
1916
+ };
1917
+ lineType: {
1918
+ name: string;
1919
+ explain: string;
1920
+ appearance: string;
1921
+ id: number;
1922
+ value?: null | string | undefined;
1923
+ };
1924
+ lineWeight: McDb.LineWeight;
1925
+ }[]>;
1926
+ /** 选中索引 */
1927
+ index: Ref<number | number[], number | number[]>;
1928
+ currentLayer: Ref<{
1929
+ id: number;
1930
+ name: string;
1931
+ visible: boolean;
1932
+ freeze: boolean;
1933
+ lock: boolean;
1934
+ print: boolean;
1935
+ status: boolean;
1936
+ color: {
1937
+ color: string;
1938
+ name: string;
1939
+ index: ColorIndex;
1940
+ method: ColorMethod;
1941
+ n: number;
1942
+ };
1943
+ lineType: {
1944
+ name: string;
1945
+ explain: string;
1946
+ appearance: string;
1947
+ id: number;
1948
+ value?: null | string | undefined;
1949
+ };
1950
+ lineWeight: McDb.LineWeight;
1951
+ } | undefined, {
1952
+ id: number;
1953
+ name: string;
1954
+ visible: boolean;
1955
+ freeze: boolean;
1956
+ lock: boolean;
1957
+ print: boolean;
1958
+ status: boolean;
1959
+ color: {
1960
+ color: string;
1961
+ name: string;
1962
+ index: ColorIndex;
1963
+ method: ColorMethod;
1964
+ n: number;
1965
+ };
1966
+ lineType: {
1967
+ name: string;
1968
+ explain: string;
1969
+ appearance: string;
1970
+ id: number;
1971
+ value?: null | string | undefined;
1972
+ };
1973
+ lineWeight: McDb.LineWeight;
1974
+ } | undefined>;
1975
+ /** 根ID */
1976
+ rootId: ComputedRef<number>;
1977
+ /** 设置索引 */
1978
+ setIndex: (i: number | number[] | Ref<number | number[], number | number[]>) => void;
1979
+ getIndex: (_index?: ({
1980
+ id: number;
1981
+ name: string;
1982
+ visible: boolean;
1983
+ freeze: boolean;
1984
+ lock: boolean;
1985
+ print: boolean;
1986
+ status: boolean;
1987
+ color: {
1988
+ color: string;
1989
+ name: string;
1990
+ index: ColorIndex;
1991
+ method: ColorMethod;
1992
+ n: number;
1993
+ };
1994
+ lineType: {
1995
+ name: string;
1996
+ explain: string;
1997
+ appearance: string;
1998
+ id: number;
1999
+ value?: null | string | undefined;
2000
+ };
2001
+ lineWeight: McDb.LineWeight;
2002
+ } | {
2003
+ id: number;
2004
+ name: string;
2005
+ visible: boolean;
2006
+ freeze: boolean;
2007
+ lock: boolean;
2008
+ print: boolean;
2009
+ status: boolean;
2010
+ color: {
2011
+ color: string;
2012
+ name: string;
2013
+ index: ColorIndex;
2014
+ method: ColorMethod;
2015
+ n: number;
2016
+ };
2017
+ lineType: {
2018
+ name: string;
2019
+ explain: string;
2020
+ appearance: string;
2021
+ id: number;
2022
+ value?: null | string | undefined;
2023
+ };
2024
+ lineWeight: McDb.LineWeight;
2025
+ }[] | Ref<{
2026
+ id: number;
2027
+ name: string;
2028
+ visible: boolean;
2029
+ freeze: boolean;
2030
+ lock: boolean;
2031
+ print: boolean;
2032
+ status: boolean;
2033
+ color: {
2034
+ color: string;
2035
+ name: string;
2036
+ index: ColorIndex;
2037
+ method: ColorMethod;
2038
+ n: number;
2039
+ };
2040
+ lineType: {
2041
+ name: string;
2042
+ explain: string;
2043
+ appearance: string;
2044
+ id: number;
2045
+ value?: null | string | undefined;
2046
+ };
2047
+ lineWeight: McDb.LineWeight;
2048
+ } | {
2049
+ id: number;
2050
+ name: string;
2051
+ visible: boolean;
2052
+ freeze: boolean;
2053
+ lock: boolean;
2054
+ print: boolean;
2055
+ status: boolean;
2056
+ color: {
2057
+ color: string;
2058
+ name: string;
2059
+ index: ColorIndex;
2060
+ method: ColorMethod;
2061
+ n: number;
2062
+ };
2063
+ lineType: {
2064
+ name: string;
2065
+ explain: string;
2066
+ appearance: string;
2067
+ id: number;
2068
+ value?: null | string | undefined;
2069
+ };
2070
+ lineWeight: McDb.LineWeight;
2071
+ }[], {
2072
+ id: number;
2073
+ name: string;
2074
+ visible: boolean;
2075
+ freeze: boolean;
2076
+ lock: boolean;
2077
+ print: boolean;
2078
+ status: boolean;
2079
+ color: {
2080
+ color: string;
2081
+ name: string;
2082
+ index: ColorIndex;
2083
+ method: ColorMethod;
2084
+ n: number;
2085
+ };
2086
+ lineType: {
2087
+ name: string;
2088
+ explain: string;
2089
+ appearance: string;
2090
+ id: number;
2091
+ value?: null | string | undefined;
2092
+ };
2093
+ lineWeight: McDb.LineWeight;
2094
+ } | {
2095
+ id: number;
2096
+ name: string;
2097
+ visible: boolean;
2098
+ freeze: boolean;
2099
+ lock: boolean;
2100
+ print: boolean;
2101
+ status: boolean;
2102
+ color: {
2103
+ color: string;
2104
+ name: string;
2105
+ index: ColorIndex;
2106
+ method: ColorMethod;
2107
+ n: number;
2108
+ };
2109
+ lineType: {
2110
+ name: string;
2111
+ explain: string;
2112
+ appearance: string;
2113
+ id: number;
2114
+ value?: null | string | undefined;
2115
+ };
2116
+ lineWeight: McDb.LineWeight;
2117
+ }[]>) | (number | number[] | Ref<number | number[], number | number[]>)) => number | number[];
2118
+ /** 添加 */
2119
+ add: (layerItem?: {
2120
+ id: number;
2121
+ name: string;
2122
+ visible: boolean;
2123
+ freeze: boolean;
2124
+ lock: boolean;
2125
+ print: boolean;
2126
+ status: boolean;
2127
+ color: {
2128
+ color: string;
2129
+ name: string;
2130
+ index: ColorIndex;
2131
+ method: ColorMethod;
2132
+ n: number;
2133
+ };
2134
+ lineType: {
2135
+ name: string;
2136
+ explain: string;
2137
+ appearance: string;
2138
+ id: number;
2139
+ value?: null | string | undefined;
2140
+ };
2141
+ lineWeight: McDb.LineWeight;
2142
+ }) => {
2143
+ id: number;
2144
+ name: string;
2145
+ visible: boolean;
2146
+ freeze: boolean;
2147
+ lock: boolean;
2148
+ print: boolean;
2149
+ status: boolean;
2150
+ color: {
2151
+ color: string;
2152
+ name: string;
2153
+ index: ColorIndex;
2154
+ method: ColorMethod;
2155
+ n: number;
2156
+ };
2157
+ lineType: {
2158
+ name: string;
2159
+ explain: string;
2160
+ appearance: string;
2161
+ id: number;
2162
+ value?: null | string | undefined;
2163
+ };
2164
+ lineWeight: McDb.LineWeight;
2165
+ };
2166
+ /** 创建 */
2167
+ create: (options?: Partial<{
2168
+ id: number;
2169
+ name: string;
2170
+ visible: boolean;
2171
+ freeze: boolean;
2172
+ lock: boolean;
2173
+ print: boolean;
2174
+ status: boolean;
2175
+ color: {
2176
+ color: string;
2177
+ name: string;
2178
+ index: ColorIndex;
2179
+ method: ColorMethod;
2180
+ n: number;
2181
+ };
2182
+ lineType: {
2183
+ name: string;
2184
+ explain: string;
2185
+ appearance: string;
2186
+ id: number;
2187
+ value?: null | string | undefined;
2188
+ };
2189
+ lineWeight: McDb.LineWeight;
2190
+ }>) => {
2191
+ id: number;
2192
+ name: string;
2193
+ visible: boolean;
2194
+ freeze: boolean;
2195
+ lock: boolean;
2196
+ print: boolean;
2197
+ status: boolean;
2198
+ color: {
2199
+ color: string;
2200
+ name: string;
2201
+ index: ColorIndex;
2202
+ method: ColorMethod;
2203
+ n: number;
2204
+ };
2205
+ lineType: {
2206
+ name: string;
2207
+ explain: string;
2208
+ appearance: string;
2209
+ id: number;
2210
+ value?: null | string | undefined;
2211
+ };
2212
+ lineWeight: McDb.LineWeight;
2213
+ };
2214
+ /** 删除 */
2215
+ remove: (layers?: number | {
2216
+ id: number;
2217
+ name: string;
2218
+ visible: boolean;
2219
+ freeze: boolean;
2220
+ lock: boolean;
2221
+ print: boolean;
2222
+ status: boolean;
2223
+ color: {
2224
+ color: string;
2225
+ name: string;
2226
+ index: ColorIndex;
2227
+ method: ColorMethod;
2228
+ n: number;
2229
+ };
2230
+ lineType: {
2231
+ name: string;
2232
+ explain: string;
2233
+ appearance: string;
2234
+ id: number;
2235
+ value?: null | string | undefined;
2236
+ };
2237
+ lineWeight: McDb.LineWeight;
2238
+ } | (number | {
2239
+ id: number;
2240
+ name: string;
2241
+ visible: boolean;
2242
+ freeze: boolean;
2243
+ lock: boolean;
2244
+ print: boolean;
2245
+ status: boolean;
2246
+ color: {
2247
+ color: string;
2248
+ name: string;
2249
+ index: ColorIndex;
2250
+ method: ColorMethod;
2251
+ n: number;
2252
+ };
2253
+ lineType: {
2254
+ name: string;
2255
+ explain: string;
2256
+ appearance: string;
2257
+ id: number;
2258
+ value?: null | string | undefined;
2259
+ };
2260
+ lineWeight: McDb.LineWeight;
2261
+ })[] | Ref<number | {
2262
+ id: number;
2263
+ name: string;
2264
+ visible: boolean;
2265
+ freeze: boolean;
2266
+ lock: boolean;
2267
+ print: boolean;
2268
+ status: boolean;
2269
+ color: {
2270
+ color: string;
2271
+ name: string;
2272
+ index: ColorIndex;
2273
+ method: ColorMethod;
2274
+ n: number;
2275
+ };
2276
+ lineType: {
2277
+ name: string;
2278
+ explain: string;
2279
+ appearance: string;
2280
+ id: number;
2281
+ value?: null | string | undefined;
2282
+ };
2283
+ lineWeight: McDb.LineWeight;
2284
+ } | (number | {
2285
+ id: number;
2286
+ name: string;
2287
+ visible: boolean;
2288
+ freeze: boolean;
2289
+ lock: boolean;
2290
+ print: boolean;
2291
+ status: boolean;
2292
+ color: {
2293
+ color: string;
2294
+ name: string;
2295
+ index: ColorIndex;
2296
+ method: ColorMethod;
2297
+ n: number;
2298
+ };
2299
+ lineType: {
2300
+ name: string;
2301
+ explain: string;
2302
+ appearance: string;
2303
+ id: number;
2304
+ value?: null | string | undefined;
2305
+ };
2306
+ lineWeight: McDb.LineWeight;
2307
+ })[], number | {
2308
+ id: number;
2309
+ name: string;
2310
+ visible: boolean;
2311
+ freeze: boolean;
2312
+ lock: boolean;
2313
+ print: boolean;
2314
+ status: boolean;
2315
+ color: {
2316
+ color: string;
2317
+ name: string;
2318
+ index: ColorIndex;
2319
+ method: ColorMethod;
2320
+ n: number;
2321
+ };
2322
+ lineType: {
2323
+ name: string;
2324
+ explain: string;
2325
+ appearance: string;
2326
+ id: number;
2327
+ value?: null | string | undefined;
2328
+ };
2329
+ lineWeight: McDb.LineWeight;
2330
+ } | (number | {
2331
+ id: number;
2332
+ name: string;
2333
+ visible: boolean;
2334
+ freeze: boolean;
2335
+ lock: boolean;
2336
+ print: boolean;
2337
+ status: boolean;
2338
+ color: {
2339
+ color: string;
2340
+ name: string;
2341
+ index: ColorIndex;
2342
+ method: ColorMethod;
2343
+ n: number;
2344
+ };
2345
+ lineType: {
2346
+ name: string;
2347
+ explain: string;
2348
+ appearance: string;
2349
+ id: number;
2350
+ value?: null | string | undefined;
2351
+ };
2352
+ lineWeight: McDb.LineWeight;
2353
+ })[]>, type?: "index" | "id" | "this") => {
2354
+ id: number;
2355
+ name: string;
2356
+ visible: boolean;
2357
+ freeze: boolean;
2358
+ lock: boolean;
2359
+ print: boolean;
2360
+ status: boolean;
2361
+ color: {
2362
+ color: string;
2363
+ name: string;
2364
+ index: ColorIndex;
2365
+ method: ColorMethod;
2366
+ n: number;
2367
+ };
2368
+ lineType: {
2369
+ name: string;
2370
+ explain: string;
2371
+ appearance: string;
2372
+ id: number;
2373
+ value?: null | string | undefined;
2374
+ };
2375
+ lineWeight: McDb.LineWeight;
2376
+ }[] | undefined;
2377
+ /** 切换状态 */
2378
+ toggle: (key: keyof Pick<{
2379
+ id: number;
2380
+ name: string;
2381
+ visible: boolean;
2382
+ freeze: boolean;
2383
+ lock: boolean;
2384
+ print: boolean;
2385
+ status: boolean;
2386
+ color: {
2387
+ color: string;
2388
+ name: string;
2389
+ index: ColorIndex;
2390
+ method: ColorMethod;
2391
+ n: number;
2392
+ };
2393
+ lineType: {
2394
+ name: string;
2395
+ explain: string;
2396
+ appearance: string;
2397
+ id: number;
2398
+ value?: null | string | undefined;
2399
+ };
2400
+ lineWeight: McDb.LineWeight;
2401
+ }, "freeze" | "lock" | "print" | "visible">, i?: number | number[] | Ref<number | number[], number | number[]>) => boolean | (boolean | undefined)[] | undefined;
2402
+ /** 设置值 */
2403
+ setValue: (key: "id" | "color" | "name" | "lineWeight" | "visible" | "lineType" | "freeze" | "lock" | "print" | "status", v: string | number | boolean | {
2404
+ color: string;
2405
+ name: string;
2406
+ index: ColorIndex;
2407
+ method: ColorMethod;
2408
+ n: number;
2409
+ } | {
2410
+ name: string;
2411
+ explain: string;
2412
+ appearance: string;
2413
+ id: number;
2414
+ value?: null | string | undefined;
2415
+ } | (string | number | boolean | {
2416
+ color: string;
2417
+ name: string;
2418
+ index: ColorIndex;
2419
+ method: ColorMethod;
2420
+ n: number;
2421
+ } | {
2422
+ name: string;
2423
+ explain: string;
2424
+ appearance: string;
2425
+ id: number;
2426
+ value?: null | string | undefined;
2427
+ })[] | Ref<string | number | boolean | {
2428
+ color: string;
2429
+ name: string;
2430
+ index: ColorIndex;
2431
+ method: ColorMethod;
2432
+ n: number;
2433
+ } | {
2434
+ name: string;
2435
+ explain: string;
2436
+ appearance: string;
2437
+ id: number;
2438
+ value?: null | string | undefined;
2439
+ } | (string | number | boolean | {
2440
+ color: string;
2441
+ name: string;
2442
+ index: ColorIndex;
2443
+ method: ColorMethod;
2444
+ n: number;
2445
+ } | {
2446
+ name: string;
2447
+ explain: string;
2448
+ appearance: string;
2449
+ id: number;
2450
+ value?: null | string | undefined;
2451
+ })[], string | number | boolean | {
2452
+ color: string;
2453
+ name: string;
2454
+ index: ColorIndex;
2455
+ method: ColorMethod;
2456
+ n: number;
2457
+ } | {
2458
+ name: string;
2459
+ explain: string;
2460
+ appearance: string;
2461
+ id: number;
2462
+ value?: null | string | undefined;
2463
+ } | (string | number | boolean | {
2464
+ color: string;
2465
+ name: string;
2466
+ index: ColorIndex;
2467
+ method: ColorMethod;
2468
+ n: number;
2469
+ } | {
2470
+ name: string;
2471
+ explain: string;
2472
+ appearance: string;
2473
+ id: number;
2474
+ value?: null | string | undefined;
2475
+ })[]>, i?: number | number[] | Ref<number | number[], number | number[]>, isSave?: boolean) => (string | number | boolean | {
2476
+ color: string;
2477
+ name: string;
2478
+ index: ColorIndex;
2479
+ method: ColorMethod;
2480
+ n: number;
2481
+ } | {
2482
+ name: string;
2483
+ explain: string;
2484
+ appearance: string;
2485
+ id: number;
2486
+ value?: null | string | undefined;
2487
+ })[];
2488
+ /** 置于当前状态 */
2489
+ putCurrent: (val?: {
2490
+ id: number;
2491
+ name: string;
2492
+ visible: boolean;
2493
+ freeze: boolean;
2494
+ lock: boolean;
2495
+ print: boolean;
2496
+ status: boolean;
2497
+ color: {
2498
+ color: string;
2499
+ name: string;
2500
+ index: ColorIndex;
2501
+ method: ColorMethod;
2502
+ n: number;
2503
+ };
2504
+ lineType: {
2505
+ name: string;
2506
+ explain: string;
2507
+ appearance: string;
2508
+ id: number;
2509
+ value?: null | string | undefined;
2510
+ };
2511
+ lineWeight: McDb.LineWeight;
2512
+ } | number, isSave?: boolean) => void;
2513
+ parseJSON: (jsonText?: string) => void;
2514
+ stringifyJSON: () => string;
2515
+ initLayerList: () => void;
2516
+ initCurrentLayer: (layerName?: string) => void;
2517
+ setLayerList: (jsonText: string) => Promise<void>;
2518
+ /** 恢复图层状态记录 */
2519
+ recoveryLayerStateHistory: () => void;
2520
+ /** 是否选中 */
2521
+ isSelected: (i: number) => boolean;
2522
+ }, "add" | "toggle" | "setIndex" | "putCurrent" | "remove" | "getIndex" | "create" | "setValue" | "parseJSON" | "stringifyJSON" | "initLayerList" | "initCurrentLayer" | "setLayerList" | "recoveryLayerStateHistory" | "isSelected">>;
2523
+
2524
+ declare const useLineType: StoreDefinition<"lineType", Pick<{
2525
+ initLineTypeList: () => void;
2526
+ createLineType: (options?: Partial<LineType>) => {
2527
+ name: string;
2528
+ explain: string;
2529
+ appearance: string;
2530
+ id: number;
2531
+ value?: null | string | undefined;
2532
+ };
2533
+ parseJSONLineType: (jsonLineType: JSONLineType) => {
2534
+ name: string;
2535
+ explain: string;
2536
+ appearance: string;
2537
+ id: number;
2538
+ value?: null | string | undefined;
2539
+ };
2540
+ stringifyJSONLineType: (lineType: LineType) => void;
2541
+ lineTypeList: Ref<{
2542
+ name: string;
2543
+ explain: string;
2544
+ appearance: string;
2545
+ id: number;
2546
+ value?: null | string | undefined;
2547
+ }[], LineType[] | {
2548
+ name: string;
2549
+ explain: string;
2550
+ appearance: string;
2551
+ id: number;
2552
+ value?: null | string | undefined;
2553
+ }[]>;
2554
+ currentLineType: Ref<LineType | undefined, LineType | undefined>;
2555
+ }, "lineTypeList" | "currentLineType">, Pick<{
2556
+ initLineTypeList: () => void;
2557
+ createLineType: (options?: Partial<LineType>) => {
2558
+ name: string;
2559
+ explain: string;
2560
+ appearance: string;
2561
+ id: number;
2562
+ value?: null | string | undefined;
2563
+ };
2564
+ parseJSONLineType: (jsonLineType: JSONLineType) => {
2565
+ name: string;
2566
+ explain: string;
2567
+ appearance: string;
2568
+ id: number;
2569
+ value?: null | string | undefined;
2570
+ };
2571
+ stringifyJSONLineType: (lineType: LineType) => void;
2572
+ lineTypeList: Ref<{
2573
+ name: string;
2574
+ explain: string;
2575
+ appearance: string;
2576
+ id: number;
2577
+ value?: null | string | undefined;
2578
+ }[], LineType[] | {
2579
+ name: string;
2580
+ explain: string;
2581
+ appearance: string;
2582
+ id: number;
2583
+ value?: null | string | undefined;
2584
+ }[]>;
2585
+ currentLineType: Ref<LineType | undefined, LineType | undefined>;
2586
+ }, never>, Pick<{
2587
+ initLineTypeList: () => void;
2588
+ createLineType: (options?: Partial<LineType>) => {
2589
+ name: string;
2590
+ explain: string;
2591
+ appearance: string;
2592
+ id: number;
2593
+ value?: null | string | undefined;
2594
+ };
2595
+ parseJSONLineType: (jsonLineType: JSONLineType) => {
2596
+ name: string;
2597
+ explain: string;
2598
+ appearance: string;
2599
+ id: number;
2600
+ value?: null | string | undefined;
2601
+ };
2602
+ stringifyJSONLineType: (lineType: LineType) => void;
2603
+ lineTypeList: Ref<{
2604
+ name: string;
2605
+ explain: string;
2606
+ appearance: string;
2607
+ id: number;
2608
+ value?: null | string | undefined;
2609
+ }[], LineType[] | {
2610
+ name: string;
2611
+ explain: string;
2612
+ appearance: string;
2613
+ id: number;
2614
+ value?: null | string | undefined;
2615
+ }[]>;
2616
+ currentLineType: Ref<LineType | undefined, LineType | undefined>;
2617
+ }, "initLineTypeList" | "createLineType" | "parseJSONLineType" | "stringifyJSONLineType">>;
2618
+
256
2619
  export { }
257
2620
 
258
2621
  /**
@@ -270,39 +2633,27 @@ declare module '@howdyjs/to-drag' {
270
2633
  }
271
2634
 
272
2635
 
273
- declare module "@tiptap/core" {
274
- interface Commands<ReturnType> {
275
- selectedText: {
276
- setSelectedText: (from: number, to: number) => ReturnType;
277
- unsetSelectedText: (from: number, to: number) => ReturnType;
278
- };
279
- }
280
- }
281
-
282
-
283
2636
  declare module '@tiptap/core' {
284
2637
  interface Commands<ReturnType> {
285
- Overline: {
2638
+ TextDecoration: {
286
2639
  /**
287
2640
  * Set the font size attribute
288
2641
  */
289
- setOverline: () => ReturnType;
2642
+ setTextDecoration: (textDecoration: string) => ReturnType;
290
2643
  /**
291
2644
  * Unset the font size attribute
292
2645
  */
293
- unsetOverline: () => ReturnType;
294
- toggleOverline: () => ReturnType;
2646
+ unsetTextDecoration: () => ReturnType;
295
2647
  };
296
2648
  }
297
2649
  }
298
2650
 
299
2651
 
300
- declare module '@tiptap/core' {
2652
+ declare module "@tiptap/core" {
301
2653
  interface Commands<ReturnType> {
302
- Underline: {
303
- setUnderline: () => ReturnType;
304
- unsetUnderline: () => ReturnType;
305
- toggleUnderline: () => ReturnType;
2654
+ selectedText: {
2655
+ setSelectedText: (from: number, to: number) => ReturnType;
2656
+ unsetSelectedText: (from: number, to: number) => ReturnType;
306
2657
  };
307
2658
  }
308
2659
  }
@@ -327,15 +2678,27 @@ declare module '@tiptap/core' {
327
2678
 
328
2679
  declare module '@tiptap/core' {
329
2680
  interface Commands<ReturnType> {
330
- TextDecoration: {
2681
+ Underline: {
2682
+ setUnderline: () => ReturnType;
2683
+ unsetUnderline: () => ReturnType;
2684
+ toggleUnderline: () => ReturnType;
2685
+ };
2686
+ }
2687
+ }
2688
+
2689
+
2690
+ declare module '@tiptap/core' {
2691
+ interface Commands<ReturnType> {
2692
+ Overline: {
331
2693
  /**
332
2694
  * Set the font size attribute
333
2695
  */
334
- setTextDecoration: (textDecoration: string) => ReturnType;
2696
+ setOverline: () => ReturnType;
335
2697
  /**
336
2698
  * Unset the font size attribute
337
2699
  */
338
- unsetTextDecoration: () => ReturnType;
2700
+ unsetOverline: () => ReturnType;
2701
+ toggleOverline: () => ReturnType;
339
2702
  };
340
2703
  }
341
2704
  }