vue-editify 0.2.9 → 0.2.11
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/examples/App.vue +11 -6
- package/lib/components/button/button.vue.d.ts +271 -0
- package/lib/components/button/props.d.ts +4 -0
- package/lib/components/checkbox/checkbox.vue.d.ts +2 -2
- package/lib/components/layer/layer.vue.d.ts +12 -3
- package/lib/components/layer/props.d.ts +4 -0
- package/lib/components/menu/menu.vue.d.ts +12 -0
- package/lib/components/menu/props.d.ts +4 -0
- package/lib/components/toolbar/props.d.ts +8 -0
- package/lib/components/toolbar/toolbar.vue.d.ts +18 -0
- package/lib/components/tooltip/props.d.ts +4 -0
- package/lib/components/tooltip/tooltip.vue.d.ts +9 -0
- package/lib/core/tool.d.ts +7 -0
- package/lib/editify/editify.vue.d.ts +89 -28
- package/lib/editify/props.d.ts +8 -0
- package/lib/editify.es.js +456 -386
- package/lib/editify.umd.js +2 -2
- package/lib/hljs/index.d.ts +7 -4
- package/lib/index.d.ts +90 -29
- package/package.json +4 -4
- package/src/components/button/button.less +48 -48
- package/src/components/button/button.vue +4 -3
- package/src/components/button/props.ts +5 -0
- package/src/components/layer/layer.less +1 -1
- package/src/components/layer/layer.vue +94 -89
- package/src/components/layer/props.ts +6 -1
- package/src/components/menu/menu.less +0 -1
- package/src/components/menu/menu.vue +46 -70
- package/src/components/menu/props.ts +5 -0
- package/src/components/toolbar/props.ts +10 -0
- package/src/components/toolbar/toolbar.vue +49 -49
- package/src/components/tooltip/props.ts +5 -0
- package/src/components/tooltip/tooltip.less +7 -15
- package/src/components/tooltip/tooltip.vue +5 -7
- package/src/core/tool.ts +27 -1
- package/src/editify/editify.less +0 -5
- package/src/editify/editify.vue +10 -6
- package/src/editify/props.ts +10 -0
- package/src/hljs/index.ts +34 -28
- package/src/index.ts +1 -1
package/lib/hljs/index.d.ts
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
|
2
|
+
/**
|
3
|
+
* 语言选项类型
|
4
|
+
*/
|
2
5
|
export type LanguagesItemType = {
|
3
6
|
label?: string;
|
4
7
|
value?: string;
|
5
8
|
};
|
9
|
+
/**
|
10
|
+
* 可选择语言列表
|
11
|
+
*/
|
12
|
+
export declare const languages: LanguagesItemType[];
|
6
13
|
/**
|
7
14
|
* 获取经过hljs处理的html元素
|
8
15
|
* @param code
|
@@ -10,7 +17,3 @@ export type LanguagesItemType = {
|
|
10
17
|
* @returns
|
11
18
|
*/
|
12
19
|
export declare const getHljsHtml: (code: string, language: string) => string;
|
13
|
-
/**
|
14
|
-
* 可选择语言列表
|
15
|
-
*/
|
16
|
-
export declare const languages: LanguagesItemType[];
|
package/lib/index.d.ts
CHANGED
@@ -118,6 +118,14 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
118
118
|
type: BooleanConstructor;
|
119
119
|
default: boolean;
|
120
120
|
};
|
121
|
+
zIndex: {
|
122
|
+
type: NumberConstructor;
|
123
|
+
default: number;
|
124
|
+
};
|
125
|
+
offset: {
|
126
|
+
type: NumberConstructor;
|
127
|
+
default: number;
|
128
|
+
};
|
121
129
|
}, {
|
122
130
|
editor: import('vue').Ref<{
|
123
131
|
$el: HTMLElement;
|
@@ -142,8 +150,8 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
142
150
|
key: number;
|
143
151
|
type: import('alex-editor').AlexElementType;
|
144
152
|
parsedom: string | null;
|
145
|
-
marks: import('alex-editor
|
146
|
-
styles: import('alex-editor
|
153
|
+
marks: import('alex-editor').ObjectType | null;
|
154
|
+
styles: import('alex-editor').ObjectType | null;
|
147
155
|
textContent: string | null;
|
148
156
|
children: any[] | null;
|
149
157
|
parent: any | null;
|
@@ -162,7 +170,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
162
170
|
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
163
171
|
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
164
172
|
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
165
|
-
isOnlyHasBreak: () => boolean;
|
173
|
+
isOnlyHasBreak: () => boolean | 0;
|
166
174
|
isPreStyle: () => boolean;
|
167
175
|
hasMarks: () => boolean;
|
168
176
|
hasStyles: () => boolean;
|
@@ -187,8 +195,8 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
187
195
|
key: number;
|
188
196
|
type: import('alex-editor').AlexElementType;
|
189
197
|
parsedom: string | null;
|
190
|
-
marks: import('alex-editor
|
191
|
-
styles: import('alex-editor
|
198
|
+
marks: import('alex-editor').ObjectType | null;
|
199
|
+
styles: import('alex-editor').ObjectType | null;
|
192
200
|
textContent: string | null;
|
193
201
|
children: any[] | null;
|
194
202
|
parent: any | null;
|
@@ -207,7 +215,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
207
215
|
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
208
216
|
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
209
217
|
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
210
|
-
isOnlyHasBreak: () => boolean;
|
218
|
+
isOnlyHasBreak: () => boolean | 0;
|
211
219
|
isPreStyle: () => boolean;
|
212
220
|
hasMarks: () => boolean;
|
213
221
|
hasStyles: () => boolean;
|
@@ -236,8 +244,8 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
236
244
|
key: number;
|
237
245
|
type: import('alex-editor').AlexElementType;
|
238
246
|
parsedom: string | null;
|
239
|
-
marks: import('alex-editor
|
240
|
-
styles: import('alex-editor
|
247
|
+
marks: import('alex-editor').ObjectType | null;
|
248
|
+
styles: import('alex-editor').ObjectType | null;
|
241
249
|
textContent: string | null;
|
242
250
|
children: any[] | null;
|
243
251
|
parent: any | null;
|
@@ -256,7 +264,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
256
264
|
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
257
265
|
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
258
266
|
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
259
|
-
isOnlyHasBreak: () => boolean;
|
267
|
+
isOnlyHasBreak: () => boolean | 0;
|
260
268
|
isPreStyle: () => boolean;
|
261
269
|
hasMarks: () => boolean;
|
262
270
|
hasStyles: () => boolean;
|
@@ -292,8 +300,8 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
292
300
|
key: number;
|
293
301
|
type: import('alex-editor').AlexElementType;
|
294
302
|
parsedom: string | null;
|
295
|
-
marks: import('alex-editor
|
296
|
-
styles: import('alex-editor
|
303
|
+
marks: import('alex-editor').ObjectType | null;
|
304
|
+
styles: import('alex-editor').ObjectType | null;
|
297
305
|
textContent: string | null;
|
298
306
|
children: any[] | null;
|
299
307
|
parent: any | null;
|
@@ -312,7 +320,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
312
320
|
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
313
321
|
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
314
322
|
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
315
|
-
isOnlyHasBreak: () => boolean;
|
323
|
+
isOnlyHasBreak: () => boolean | 0;
|
316
324
|
isPreStyle: () => boolean;
|
317
325
|
hasMarks: () => boolean;
|
318
326
|
hasStyles: () => boolean;
|
@@ -337,8 +345,8 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
337
345
|
key: number;
|
338
346
|
type: import('alex-editor').AlexElementType;
|
339
347
|
parsedom: string | null;
|
340
|
-
marks: import('alex-editor
|
341
|
-
styles: import('alex-editor
|
348
|
+
marks: import('alex-editor').ObjectType | null;
|
349
|
+
styles: import('alex-editor').ObjectType | null;
|
342
350
|
textContent: string | null;
|
343
351
|
children: any[] | null;
|
344
352
|
parent: any | null;
|
@@ -357,7 +365,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
357
365
|
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
358
366
|
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
359
367
|
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
360
|
-
isOnlyHasBreak: () => boolean;
|
368
|
+
isOnlyHasBreak: () => boolean | 0;
|
361
369
|
isPreStyle: () => boolean;
|
362
370
|
hasMarks: () => boolean;
|
363
371
|
hasStyles: () => boolean;
|
@@ -386,8 +394,8 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
386
394
|
key: number;
|
387
395
|
type: import('alex-editor').AlexElementType;
|
388
396
|
parsedom: string | null;
|
389
|
-
marks: import('alex-editor
|
390
|
-
styles: import('alex-editor
|
397
|
+
marks: import('alex-editor').ObjectType | null;
|
398
|
+
styles: import('alex-editor').ObjectType | null;
|
391
399
|
textContent: string | null;
|
392
400
|
children: any[] | null;
|
393
401
|
parent: any | null;
|
@@ -406,7 +414,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
406
414
|
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
407
415
|
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
408
416
|
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
409
|
-
isOnlyHasBreak: () => boolean;
|
417
|
+
isOnlyHasBreak: () => boolean | 0;
|
410
418
|
isPreStyle: () => boolean;
|
411
419
|
hasMarks: () => boolean;
|
412
420
|
hasStyles: () => boolean;
|
@@ -432,8 +440,50 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
432
440
|
};
|
433
441
|
} | null;
|
434
442
|
__guid: number;
|
435
|
-
__events: import('alex-editor
|
436
|
-
|
443
|
+
__events: import('alex-editor').ObjectType;
|
444
|
+
__oldStack: {
|
445
|
+
key: number;
|
446
|
+
type: import('alex-editor').AlexElementType;
|
447
|
+
parsedom: string | null;
|
448
|
+
marks: import('alex-editor').ObjectType | null;
|
449
|
+
styles: import('alex-editor').ObjectType | null;
|
450
|
+
textContent: string | null;
|
451
|
+
children: any[] | null;
|
452
|
+
parent: any | null;
|
453
|
+
behavior: "default" | "block";
|
454
|
+
namespace: string | null;
|
455
|
+
locked: boolean;
|
456
|
+
elm: HTMLElement | null;
|
457
|
+
isBlock: () => boolean;
|
458
|
+
isInblock: () => boolean;
|
459
|
+
isInline: () => boolean;
|
460
|
+
isClosed: () => boolean;
|
461
|
+
isText: () => boolean;
|
462
|
+
isBreak: () => boolean;
|
463
|
+
isEmpty: () => boolean;
|
464
|
+
isSpaceText: () => boolean;
|
465
|
+
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
466
|
+
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
467
|
+
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
468
|
+
isOnlyHasBreak: () => boolean | 0;
|
469
|
+
isPreStyle: () => boolean;
|
470
|
+
hasMarks: () => boolean;
|
471
|
+
hasStyles: () => boolean;
|
472
|
+
hasChildren: () => boolean;
|
473
|
+
hasContains: (element: import('alex-editor').AlexElement) => boolean;
|
474
|
+
clone: (deep?: boolean | undefined) => import('alex-editor').AlexElement;
|
475
|
+
convertToBlock: () => void;
|
476
|
+
toEmpty: () => void;
|
477
|
+
getBlock: () => import('alex-editor').AlexElement;
|
478
|
+
getInblock: () => import('alex-editor').AlexElement | null;
|
479
|
+
getInline: () => import('alex-editor').AlexElement | null;
|
480
|
+
isEqualStyles: (element: import('alex-editor').AlexElement) => boolean;
|
481
|
+
isEqualMarks: (element: import('alex-editor').AlexElement) => boolean;
|
482
|
+
isFirst: (element: import('alex-editor').AlexElement) => boolean;
|
483
|
+
isLast: (element: import('alex-editor').AlexElement) => boolean;
|
484
|
+
__render: () => void;
|
485
|
+
__fullClone: () => import('alex-editor').AlexElement;
|
486
|
+
}[];
|
437
487
|
__isInputChinese: boolean;
|
438
488
|
__innerSelectionChange: boolean;
|
439
489
|
__chineseInputTimer: any;
|
@@ -474,8 +524,8 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
474
524
|
key: number;
|
475
525
|
type: import('alex-editor').AlexElementType;
|
476
526
|
parsedom: string | null;
|
477
|
-
marks: import('alex-editor
|
478
|
-
styles: import('alex-editor
|
527
|
+
marks: import('alex-editor').ObjectType | null;
|
528
|
+
styles: import('alex-editor').ObjectType | null;
|
479
529
|
textContent: string | null;
|
480
530
|
children: any[] | null;
|
481
531
|
parent: any | null;
|
@@ -494,7 +544,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
494
544
|
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
495
545
|
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
496
546
|
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
497
|
-
isOnlyHasBreak: () => boolean;
|
547
|
+
isOnlyHasBreak: () => boolean | 0;
|
498
548
|
isPreStyle: () => boolean;
|
499
549
|
hasMarks: () => boolean;
|
500
550
|
hasStyles: () => boolean;
|
@@ -520,8 +570,8 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
520
570
|
key: number;
|
521
571
|
type: import('alex-editor').AlexElementType;
|
522
572
|
parsedom: string | null;
|
523
|
-
marks: import('alex-editor
|
524
|
-
styles: import('alex-editor
|
573
|
+
marks: import('alex-editor').ObjectType | null;
|
574
|
+
styles: import('alex-editor').ObjectType | null;
|
525
575
|
textContent: string | null;
|
526
576
|
children: any[] | null;
|
527
577
|
parent: any | null;
|
@@ -540,7 +590,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
540
590
|
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
541
591
|
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
542
592
|
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
543
|
-
isOnlyHasBreak: () => boolean;
|
593
|
+
isOnlyHasBreak: () => boolean | 0;
|
544
594
|
isPreStyle: () => boolean;
|
545
595
|
hasMarks: () => boolean;
|
546
596
|
hasStyles: () => boolean;
|
@@ -563,6 +613,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
563
613
|
}[];
|
564
614
|
}>;
|
565
615
|
textValue: import('vue').ComputedRef<string>;
|
616
|
+
menuHeight: import('vue').ComputedRef<number | null>;
|
566
617
|
collapseToEnd: () => void;
|
567
618
|
collapseToStart: () => void;
|
568
619
|
undo: () => void;
|
@@ -695,22 +746,31 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
695
746
|
type: BooleanConstructor;
|
696
747
|
default: boolean;
|
697
748
|
};
|
749
|
+
zIndex: {
|
750
|
+
type: NumberConstructor;
|
751
|
+
default: number;
|
752
|
+
};
|
753
|
+
offset: {
|
754
|
+
type: NumberConstructor;
|
755
|
+
default: number;
|
756
|
+
};
|
698
757
|
}>> & {
|
758
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
699
759
|
onFocus?: ((...args: any[]) => any) | undefined;
|
700
760
|
onBlur?: ((...args: any[]) => any) | undefined;
|
701
761
|
onChange?: ((...args: any[]) => any) | undefined;
|
702
762
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
703
763
|
onKeyup?: ((...args: any[]) => any) | undefined;
|
704
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
705
764
|
onInsertparagraph?: ((...args: any[]) => any) | undefined;
|
706
765
|
onRangeupdate?: ((...args: any[]) => any) | undefined;
|
707
766
|
onUpdateview?: ((...args: any[]) => any) | undefined;
|
708
767
|
}, {
|
709
768
|
color: string | null;
|
710
769
|
disabled: boolean;
|
711
|
-
|
770
|
+
zIndex: number;
|
712
771
|
modelValue: string;
|
713
772
|
border: boolean;
|
773
|
+
menu: import('./core/tool').MenuConfigType;
|
714
774
|
placeholder: string;
|
715
775
|
autoheight: boolean;
|
716
776
|
toolbar: import('./core/tool').ToolbarConfigType;
|
@@ -735,6 +795,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
735
795
|
tab: boolean;
|
736
796
|
plugins: import('./core/tool').PluginType[];
|
737
797
|
dark: boolean;
|
798
|
+
offset: number;
|
738
799
|
}, {}>>;
|
739
800
|
export type { ButtonTypeType, ButtonOptionsItemType, ButtonSelectConfigType, ButtonDisplayConfigType } from './components/button/props';
|
740
801
|
export type { InsertImageUploadErrorType } from './components/insertImage/props';
|
@@ -743,7 +804,7 @@ export type { MenuButtonType, MenuSelectButtonType, MenuDisplayButtonType, MenuI
|
|
743
804
|
export type { ElementMatchConfigType } from './core/function';
|
744
805
|
export { elementIsMatch, getMatchElementByElement, getMatchElementByRange, isList, isTask, elementIsInList, elementIsInTask, hasPreInRange, hasQuoteInRange, hasListInRange, hasTaskInRange, hasLinkInRange, hasTableInRange, hasImageInRange, hasVideoInRange, isRangeInQuote, isRangeInList, isRangeInTask, queryTextStyle, queryTextMark, getRangeText, setIndentIncrease, setIndentDecrease, setQuote, setAlign, setList, setTask, setTextStyle, setTextMark, removeTextStyle, removeTextMark, setLineHeight, insertLink, insertImage, insertVideo, insertTable, insertCodeBlock, insertSeparator } from './core/function';
|
745
806
|
declare const install: (app: App) => void;
|
746
|
-
declare const version = "0.2.
|
807
|
+
declare const version = "0.2.11";
|
747
808
|
export { AlexElement } from 'alex-editor';
|
748
809
|
export type { AttachmentOptionsType } from './plugins/attachment';
|
749
810
|
export type { InsertAttachmentUploadErrorType } from './plugins/attachment/insertAttachment/props';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vue-editify",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.11",
|
4
4
|
"private": false,
|
5
5
|
"sideEffects": [
|
6
6
|
"*.css"
|
@@ -17,11 +17,11 @@
|
|
17
17
|
"lib": "vue-tsc && vite build"
|
18
18
|
},
|
19
19
|
"dependencies": {
|
20
|
-
"alex-editor": "^1.4.
|
21
|
-
"dap-util": "^1.5.
|
20
|
+
"alex-editor": "^1.4.20",
|
21
|
+
"dap-util": "^1.5.8",
|
22
22
|
"highlight.js": "^11.8.0",
|
23
23
|
"katex": "^0.16.10",
|
24
|
-
"vue": "^3.4.
|
24
|
+
"vue": "^3.4.31"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
27
|
"@types/katex": "^0.16.7",
|
@@ -78,66 +78,66 @@
|
|
78
78
|
}
|
79
79
|
}
|
80
80
|
}
|
81
|
+
}
|
81
82
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
83
|
+
.editify-button-layer {
|
84
|
+
display: block;
|
85
|
+
position: relative;
|
86
|
+
overflow-x: hidden;
|
87
|
+
overflow-y: auto;
|
87
88
|
|
88
|
-
|
89
|
-
|
90
|
-
|
89
|
+
&:not(:hover)::-webkit-scrollbar {
|
90
|
+
display: none;
|
91
|
+
}
|
92
|
+
|
93
|
+
.editify-button-options {
|
94
|
+
display: block;
|
95
|
+
width: 100%;
|
96
|
+
padding: 4px 0;
|
91
97
|
|
92
|
-
.editify-button-
|
93
|
-
display:
|
98
|
+
.editify-button-option {
|
99
|
+
display: flex;
|
100
|
+
justify-content: flex-start;
|
101
|
+
align-items: center;
|
94
102
|
width: 100%;
|
95
|
-
padding:
|
103
|
+
padding: 6px 12px;
|
104
|
+
transition: all 300ms;
|
105
|
+
opacity: 0.8;
|
106
|
+
white-space: nowrap;
|
107
|
+
text-overflow: ellipsis;
|
108
|
+
overflow: hidden;
|
109
|
+
box-sizing: border-box;
|
96
110
|
|
97
|
-
|
111
|
+
&:hover {
|
112
|
+
opacity: 1;
|
113
|
+
cursor: pointer;
|
114
|
+
background-color: var(--editify-background-dark);
|
115
|
+
}
|
116
|
+
|
117
|
+
&:active {
|
118
|
+
opacity: 1;
|
119
|
+
background-color: var(--editify-background-darker);
|
120
|
+
}
|
121
|
+
|
122
|
+
&.editify-active {
|
123
|
+
opacity: 1;
|
124
|
+
background-color: var(--editify-background-darker);
|
125
|
+
}
|
126
|
+
|
127
|
+
.editify-button-option-flex {
|
98
128
|
display: flex;
|
99
129
|
justify-content: flex-start;
|
100
130
|
align-items: center;
|
101
131
|
width: 100%;
|
102
|
-
padding: 6px 12px;
|
103
|
-
transition: all 300ms;
|
104
|
-
opacity: 0.8;
|
105
|
-
white-space: nowrap;
|
106
|
-
text-overflow: ellipsis;
|
107
|
-
overflow: hidden;
|
108
|
-
box-sizing: border-box;
|
109
|
-
|
110
|
-
&:hover {
|
111
|
-
opacity: 1;
|
112
|
-
cursor: pointer;
|
113
|
-
background-color: var(--editify-background-dark);
|
114
|
-
}
|
115
|
-
|
116
|
-
&:active {
|
117
|
-
opacity: 1;
|
118
|
-
background-color: var(--editify-background-darker);
|
119
|
-
}
|
120
132
|
|
121
|
-
|
122
|
-
|
123
|
-
background-color: var(--editify-background-darker);
|
133
|
+
:deep(.editify-icon) {
|
134
|
+
margin-right: 10px;
|
124
135
|
}
|
125
136
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
width: 100%;
|
131
|
-
|
132
|
-
:deep(.editify-icon) {
|
133
|
-
margin-right: 10px;
|
134
|
-
}
|
135
|
-
|
136
|
-
span {
|
137
|
-
overflow: hidden;
|
138
|
-
text-overflow: ellipsis;
|
139
|
-
white-space: nowrap;
|
140
|
-
}
|
137
|
+
span {
|
138
|
+
overflow: hidden;
|
139
|
+
text-overflow: ellipsis;
|
140
|
+
white-space: nowrap;
|
141
141
|
}
|
142
142
|
}
|
143
143
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="editify-button">
|
3
3
|
<div class="editify-button-wrap" :class="{ 'editify-right-border': rightBorder, 'editify-left-border': leftBorder }">
|
4
|
-
<Tooltip :content="title" :disabled="!tooltip">
|
4
|
+
<Tooltip :content="title" :disabled="!tooltip" :z-index="zIndex">
|
5
5
|
<div ref="btnRef" :style="btnStyle" class="editify-button-el" :class="{ 'editify-disabled': disabled, 'editify-active': active }" @mouseenter="status = 'hover'" @mouseleave="status = null" @mousedown="status = 'down'" @mouseup="status = 'hover'" @click="handleClick">
|
6
6
|
<div v-if="type == 'default' || type == 'select'" class="editify-button-slot">
|
7
7
|
<slot></slot>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<Icon v-if="type == 'select' || type == 'display'" value="caret-down" class="editify-button-caret" :class="{ 'editify-rotate': show }"></Icon>
|
11
11
|
</div>
|
12
12
|
</Tooltip>
|
13
|
-
<Layer ref="layerRef" v-model="show" :node="btnRef" border
|
13
|
+
<Layer ref="layerRef" v-model="show" :node="btnRef" border placement="bottom-start" :z-index="zIndex + 1" animation="translate" @show="emits('layerShow')" @shown="emits('layerShown')" @hidden="emits('layerHidden')">
|
14
14
|
<div class="editify-button-layer" :style="{ width: (type == 'select' ? parseSelectConfig.width : parseDisplayConfig.width) + 'px', maxHeight: (type == 'select' ? parseSelectConfig.maxHeight : parseDisplayConfig.maxHeight) + 'px', overflow: hideScroll ? 'visible' : '' }">
|
15
15
|
<slot v-if="$slots.layer" name="layer" :options="cmpOptions"></slot>
|
16
16
|
<div v-else class="editify-button-options">
|
@@ -194,7 +194,8 @@ const handleClick = () => {
|
|
194
194
|
|
195
195
|
defineExpose({
|
196
196
|
show,
|
197
|
-
status
|
197
|
+
status,
|
198
|
+
layerRef
|
198
199
|
})
|
199
200
|
</script>
|
200
201
|
<style scoped src="./button.less"></style>
|