@tmagic/editor 1.5.0-beta.11 → 1.5.0-beta.13
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.
- package/dist/style.css +15 -11
- package/dist/tmagic-editor.js +308 -288
- package/dist/tmagic-editor.umd.cjs +304 -284
- package/package.json +7 -7
- package/src/Editor.vue +6 -1
- package/src/editorProps.ts +3 -1
- package/src/initService.ts +94 -70
- package/src/layouts/Framework.vue +8 -1
- package/src/layouts/page-bar/AddButton.vue +29 -9
- package/src/layouts/page-bar/PageBar.vue +35 -65
- package/src/layouts/page-bar/PageBarScrollContainer.vue +45 -84
- package/src/layouts/page-bar/PageList.vue +1 -1
- package/src/layouts/page-bar/Search.vue +67 -0
- package/src/layouts/workspace/viewer/Stage.vue +11 -0
- package/src/services/dep.ts +12 -2
- package/src/services/editor.ts +20 -40
- package/src/theme/page-bar.scss +19 -12
- package/src/type.ts +2 -1
- package/src/utils/idle-task.ts +3 -2
- package/types/index.d.ts +38 -2
- package/src/layouts/page-bar/SwitchTypeButton.vue +0 -45
package/types/index.d.ts
CHANGED
|
@@ -306,7 +306,7 @@ declare class Dep extends export_default {
|
|
|
306
306
|
removeTarget(id: Id, type?: string): void;
|
|
307
307
|
clearTargets(): void;
|
|
308
308
|
collect(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType): void;
|
|
309
|
-
collectIdle(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType): void
|
|
309
|
+
collectIdle(nodes: MNode[], depExtendedData?: DepExtendedData, deep?: boolean, type?: DepTargetType): Promise<void>;
|
|
310
310
|
collectNode(node: MNode, target: Target, depExtendedData?: DepExtendedData, deep?: boolean): void;
|
|
311
311
|
clear(nodes?: MNode[]): void;
|
|
312
312
|
clearByType(type: DepTargetType, nodes?: MNode[]): void;
|
|
@@ -840,6 +840,7 @@ interface FrameworkSlots {
|
|
|
840
840
|
'props-panel'(props: {}): any;
|
|
841
841
|
'footer'(props: {}): any;
|
|
842
842
|
'page-bar'(props: {}): any;
|
|
843
|
+
'page-bar-add-button'(props: {}): any;
|
|
843
844
|
'page-bar-title'(props: {
|
|
844
845
|
page: MPage | MPageFragment;
|
|
845
846
|
}): any;
|
|
@@ -847,7 +848,7 @@ interface FrameworkSlots {
|
|
|
847
848
|
page: MPage | MPageFragment;
|
|
848
849
|
}): any;
|
|
849
850
|
'page-list-popover'(props: {
|
|
850
|
-
list: MPage
|
|
851
|
+
list: (MPage | MPageFragment)[];
|
|
851
852
|
}): any;
|
|
852
853
|
}
|
|
853
854
|
interface WorkspaceSlots {
|
|
@@ -2563,6 +2564,8 @@ interface EditorProps {
|
|
|
2563
2564
|
extendFormState?: (state: FormState$1) => Record<string, any> | Promise<Record<string, any>>;
|
|
2564
2565
|
/** 页面顺序拖拽配置参数 */
|
|
2565
2566
|
pageBarSortOptions?: PageBarSortOptions;
|
|
2567
|
+
/** 页面搜索函数 */
|
|
2568
|
+
pageFilterFunction?: (page: MPage | MPageFragment, keyword: string) => boolean;
|
|
2566
2569
|
}
|
|
2567
2570
|
|
|
2568
2571
|
declare function __VLS_template$b(): {
|
|
@@ -2653,6 +2656,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
2653
2656
|
labelPosition?: string;
|
|
2654
2657
|
keyProp?: string;
|
|
2655
2658
|
popperClass?: string;
|
|
2659
|
+
preventSubmitDefault?: boolean;
|
|
2656
2660
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2657
2661
|
}> & Readonly<{
|
|
2658
2662
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -2687,6 +2691,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
2687
2691
|
labelPosition?: string;
|
|
2688
2692
|
keyProp?: string;
|
|
2689
2693
|
popperClass?: string;
|
|
2694
|
+
preventSubmitDefault?: boolean;
|
|
2690
2695
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2691
2696
|
}> & Readonly<{
|
|
2692
2697
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -2728,6 +2733,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
2728
2733
|
labelPosition?: string;
|
|
2729
2734
|
keyProp?: string;
|
|
2730
2735
|
popperClass?: string;
|
|
2736
|
+
preventSubmitDefault?: boolean;
|
|
2731
2737
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2732
2738
|
}> & Readonly<{
|
|
2733
2739
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -2770,6 +2776,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
2770
2776
|
labelPosition?: string;
|
|
2771
2777
|
keyProp?: string;
|
|
2772
2778
|
popperClass?: string;
|
|
2779
|
+
preventSubmitDefault?: boolean;
|
|
2773
2780
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2774
2781
|
}> & Readonly<{
|
|
2775
2782
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -2804,6 +2811,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
2804
2811
|
labelPosition?: string;
|
|
2805
2812
|
keyProp?: string;
|
|
2806
2813
|
popperClass?: string;
|
|
2814
|
+
preventSubmitDefault?: boolean;
|
|
2807
2815
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2808
2816
|
}> & Readonly<{
|
|
2809
2817
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -2845,6 +2853,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
2845
2853
|
labelPosition?: string;
|
|
2846
2854
|
keyProp?: string;
|
|
2847
2855
|
popperClass?: string;
|
|
2856
|
+
preventSubmitDefault?: boolean;
|
|
2848
2857
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2849
2858
|
}> & Readonly<{
|
|
2850
2859
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -2921,6 +2930,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
2921
2930
|
labelPosition?: string;
|
|
2922
2931
|
keyProp?: string;
|
|
2923
2932
|
popperClass?: string;
|
|
2933
|
+
preventSubmitDefault?: boolean;
|
|
2924
2934
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2925
2935
|
}> & Readonly<{
|
|
2926
2936
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -2955,6 +2965,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
2955
2965
|
labelPosition?: string;
|
|
2956
2966
|
keyProp?: string;
|
|
2957
2967
|
popperClass?: string;
|
|
2968
|
+
preventSubmitDefault?: boolean;
|
|
2958
2969
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2959
2970
|
}> & Readonly<{
|
|
2960
2971
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -2996,6 +3007,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
2996
3007
|
labelPosition?: string;
|
|
2997
3008
|
keyProp?: string;
|
|
2998
3009
|
popperClass?: string;
|
|
3010
|
+
preventSubmitDefault?: boolean;
|
|
2999
3011
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3000
3012
|
}> & Readonly<{
|
|
3001
3013
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3038,6 +3050,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3038
3050
|
labelPosition?: string;
|
|
3039
3051
|
keyProp?: string;
|
|
3040
3052
|
popperClass?: string;
|
|
3053
|
+
preventSubmitDefault?: boolean;
|
|
3041
3054
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3042
3055
|
}> & Readonly<{
|
|
3043
3056
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3072,6 +3085,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3072
3085
|
labelPosition?: string;
|
|
3073
3086
|
keyProp?: string;
|
|
3074
3087
|
popperClass?: string;
|
|
3088
|
+
preventSubmitDefault?: boolean;
|
|
3075
3089
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3076
3090
|
}> & Readonly<{
|
|
3077
3091
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3113,6 +3127,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3113
3127
|
labelPosition?: string;
|
|
3114
3128
|
keyProp?: string;
|
|
3115
3129
|
popperClass?: string;
|
|
3130
|
+
preventSubmitDefault?: boolean;
|
|
3116
3131
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3117
3132
|
}> & Readonly<{
|
|
3118
3133
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3204,6 +3219,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3204
3219
|
labelPosition?: string;
|
|
3205
3220
|
keyProp?: string;
|
|
3206
3221
|
popperClass?: string;
|
|
3222
|
+
preventSubmitDefault?: boolean;
|
|
3207
3223
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3208
3224
|
}> & Readonly<{
|
|
3209
3225
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3238,6 +3254,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3238
3254
|
labelPosition?: string;
|
|
3239
3255
|
keyProp?: string;
|
|
3240
3256
|
popperClass?: string;
|
|
3257
|
+
preventSubmitDefault?: boolean;
|
|
3241
3258
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3242
3259
|
}> & Readonly<{
|
|
3243
3260
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3279,6 +3296,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3279
3296
|
labelPosition?: string;
|
|
3280
3297
|
keyProp?: string;
|
|
3281
3298
|
popperClass?: string;
|
|
3299
|
+
preventSubmitDefault?: boolean;
|
|
3282
3300
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3283
3301
|
}> & Readonly<{
|
|
3284
3302
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3321,6 +3339,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3321
3339
|
labelPosition?: string;
|
|
3322
3340
|
keyProp?: string;
|
|
3323
3341
|
popperClass?: string;
|
|
3342
|
+
preventSubmitDefault?: boolean;
|
|
3324
3343
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3325
3344
|
}> & Readonly<{
|
|
3326
3345
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3355,6 +3374,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3355
3374
|
labelPosition?: string;
|
|
3356
3375
|
keyProp?: string;
|
|
3357
3376
|
popperClass?: string;
|
|
3377
|
+
preventSubmitDefault?: boolean;
|
|
3358
3378
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3359
3379
|
}> & Readonly<{
|
|
3360
3380
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3396,6 +3416,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3396
3416
|
labelPosition?: string;
|
|
3397
3417
|
keyProp?: string;
|
|
3398
3418
|
popperClass?: string;
|
|
3419
|
+
preventSubmitDefault?: boolean;
|
|
3399
3420
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3400
3421
|
}> & Readonly<{
|
|
3401
3422
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3472,6 +3493,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3472
3493
|
labelPosition?: string;
|
|
3473
3494
|
keyProp?: string;
|
|
3474
3495
|
popperClass?: string;
|
|
3496
|
+
preventSubmitDefault?: boolean;
|
|
3475
3497
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3476
3498
|
}> & Readonly<{
|
|
3477
3499
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3506,6 +3528,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3506
3528
|
labelPosition?: string;
|
|
3507
3529
|
keyProp?: string;
|
|
3508
3530
|
popperClass?: string;
|
|
3531
|
+
preventSubmitDefault?: boolean;
|
|
3509
3532
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3510
3533
|
}> & Readonly<{
|
|
3511
3534
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3547,6 +3570,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3547
3570
|
labelPosition?: string;
|
|
3548
3571
|
keyProp?: string;
|
|
3549
3572
|
popperClass?: string;
|
|
3573
|
+
preventSubmitDefault?: boolean;
|
|
3550
3574
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3551
3575
|
}> & Readonly<{
|
|
3552
3576
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3589,6 +3613,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3589
3613
|
labelPosition?: string;
|
|
3590
3614
|
keyProp?: string;
|
|
3591
3615
|
popperClass?: string;
|
|
3616
|
+
preventSubmitDefault?: boolean;
|
|
3592
3617
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3593
3618
|
}> & Readonly<{
|
|
3594
3619
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3623,6 +3648,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3623
3648
|
labelPosition?: string;
|
|
3624
3649
|
keyProp?: string;
|
|
3625
3650
|
popperClass?: string;
|
|
3651
|
+
preventSubmitDefault?: boolean;
|
|
3626
3652
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3627
3653
|
}> & Readonly<{
|
|
3628
3654
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -3664,6 +3690,7 @@ declare const __VLS_component$b: vue.DefineComponent<EditorProps, {
|
|
|
3664
3690
|
labelPosition?: string;
|
|
3665
3691
|
keyProp?: string;
|
|
3666
3692
|
popperClass?: string;
|
|
3693
|
+
preventSubmitDefault?: boolean;
|
|
3667
3694
|
extendState?: (state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3668
3695
|
}> & Readonly<{
|
|
3669
3696
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4323,6 +4350,7 @@ declare function __VLS_template$6(): {
|
|
|
4323
4350
|
labelPosition?: string;
|
|
4324
4351
|
keyProp?: string;
|
|
4325
4352
|
popperClass?: string;
|
|
4353
|
+
preventSubmitDefault?: boolean;
|
|
4326
4354
|
extendState?: (state: FormState$1) => Record<string, any> | Promise<Record<string, any>>;
|
|
4327
4355
|
}> & Readonly<{
|
|
4328
4356
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4357,6 +4385,7 @@ declare function __VLS_template$6(): {
|
|
|
4357
4385
|
labelPosition?: string;
|
|
4358
4386
|
keyProp?: string;
|
|
4359
4387
|
popperClass?: string;
|
|
4388
|
+
preventSubmitDefault?: boolean;
|
|
4360
4389
|
extendState?: (state: FormState$1) => Record<string, any> | Promise<Record<string, any>>;
|
|
4361
4390
|
}> & Readonly<{
|
|
4362
4391
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4398,6 +4427,7 @@ declare function __VLS_template$6(): {
|
|
|
4398
4427
|
labelPosition?: string;
|
|
4399
4428
|
keyProp?: string;
|
|
4400
4429
|
popperClass?: string;
|
|
4430
|
+
preventSubmitDefault?: boolean;
|
|
4401
4431
|
extendState?: (state: FormState$1) => Record<string, any> | Promise<Record<string, any>>;
|
|
4402
4432
|
}> & Readonly<{
|
|
4403
4433
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4449,6 +4479,7 @@ declare const __VLS_component$6: vue.DefineComponent<{
|
|
|
4449
4479
|
labelPosition?: string;
|
|
4450
4480
|
keyProp?: string;
|
|
4451
4481
|
popperClass?: string;
|
|
4482
|
+
preventSubmitDefault?: boolean;
|
|
4452
4483
|
extendState?: (state: FormState$1) => Record<string, any> | Promise<Record<string, any>>;
|
|
4453
4484
|
}> & Readonly<{
|
|
4454
4485
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4483,6 +4514,7 @@ declare const __VLS_component$6: vue.DefineComponent<{
|
|
|
4483
4514
|
labelPosition?: string;
|
|
4484
4515
|
keyProp?: string;
|
|
4485
4516
|
popperClass?: string;
|
|
4517
|
+
preventSubmitDefault?: boolean;
|
|
4486
4518
|
extendState?: (state: FormState$1) => Record<string, any> | Promise<Record<string, any>>;
|
|
4487
4519
|
}> & Readonly<{
|
|
4488
4520
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4524,6 +4556,7 @@ declare const __VLS_component$6: vue.DefineComponent<{
|
|
|
4524
4556
|
labelPosition?: string;
|
|
4525
4557
|
keyProp?: string;
|
|
4526
4558
|
popperClass?: string;
|
|
4559
|
+
preventSubmitDefault?: boolean;
|
|
4527
4560
|
extendState?: (state: FormState$1) => Record<string, any> | Promise<Record<string, any>>;
|
|
4528
4561
|
}> & Readonly<{
|
|
4529
4562
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4566,6 +4599,7 @@ declare const __VLS_component$6: vue.DefineComponent<{
|
|
|
4566
4599
|
labelPosition?: string;
|
|
4567
4600
|
keyProp?: string;
|
|
4568
4601
|
popperClass?: string;
|
|
4602
|
+
preventSubmitDefault?: boolean;
|
|
4569
4603
|
extendState?: (state: FormState$1) => Record<string, any> | Promise<Record<string, any>>;
|
|
4570
4604
|
}> & Readonly<{
|
|
4571
4605
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4600,6 +4634,7 @@ declare const __VLS_component$6: vue.DefineComponent<{
|
|
|
4600
4634
|
labelPosition?: string;
|
|
4601
4635
|
keyProp?: string;
|
|
4602
4636
|
popperClass?: string;
|
|
4637
|
+
preventSubmitDefault?: boolean;
|
|
4603
4638
|
extendState?: (state: FormState$1) => Record<string, any> | Promise<Record<string, any>>;
|
|
4604
4639
|
}> & Readonly<{
|
|
4605
4640
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -4641,6 +4676,7 @@ declare const __VLS_component$6: vue.DefineComponent<{
|
|
|
4641
4676
|
labelPosition?: string;
|
|
4642
4677
|
keyProp?: string;
|
|
4643
4678
|
popperClass?: string;
|
|
4679
|
+
preventSubmitDefault?: boolean;
|
|
4644
4680
|
extendState?: (state: FormState$1) => Record<string, any> | Promise<Record<string, any>>;
|
|
4645
4681
|
}> & Readonly<{
|
|
4646
4682
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<TMagicButton
|
|
3
|
-
v-for="item in data"
|
|
4
|
-
class="m-editor-page-bar-switch-type-button"
|
|
5
|
-
size="small"
|
|
6
|
-
:key="item.type"
|
|
7
|
-
link
|
|
8
|
-
:class="{ active: modelValue === item.type }"
|
|
9
|
-
:type="modelValue === item.type ? 'primary' : ''"
|
|
10
|
-
@click="clickHandler(item.type)"
|
|
11
|
-
>{{ item.text }}</TMagicButton
|
|
12
|
-
>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script setup lang="ts">
|
|
16
|
-
import { NodeType } from '@tmagic/core';
|
|
17
|
-
import { TMagicButton } from '@tmagic/design';
|
|
18
|
-
|
|
19
|
-
defineOptions({
|
|
20
|
-
name: 'MEditorPageBarSwitchTypeButton',
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
defineProps<{
|
|
24
|
-
modelValue: NodeType.PAGE | NodeType.PAGE_FRAGMENT;
|
|
25
|
-
}>();
|
|
26
|
-
|
|
27
|
-
const data: { type: NodeType.PAGE | NodeType.PAGE_FRAGMENT; text: string }[] = [
|
|
28
|
-
{
|
|
29
|
-
type: NodeType.PAGE,
|
|
30
|
-
text: '页面',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
type: NodeType.PAGE_FRAGMENT,
|
|
34
|
-
text: '页面片',
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
|
|
38
|
-
const emit = defineEmits<{
|
|
39
|
-
'update:modelValue': [value: NodeType.PAGE | NodeType.PAGE_FRAGMENT];
|
|
40
|
-
}>();
|
|
41
|
-
|
|
42
|
-
const clickHandler = (value: NodeType.PAGE | NodeType.PAGE_FRAGMENT) => {
|
|
43
|
-
emit('update:modelValue', value);
|
|
44
|
-
};
|
|
45
|
-
</script>
|