File tree 3 files changed +31
-8
lines changed
devui/editor-md/src/components
docs/components/editor-md
3 files changed +31
-8
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,20 @@ export default defineComponent({
41
41
return ( ) => (
42
42
< >
43
43
{ config . type === 'button' && (
44
- < Tooltip position = { [ 'top' , 'bottom' ] } content = { getTooltipContent ( config . name , config . shortKey ) } hide-after = { 1000 } >
45
- < span
46
- class = "md-toolbar-item"
47
- onClick = { onToolbarItemClick }
48
- innerHTML = { config . id === 'fullscreen' ? ( showFullscreen . value ? config . exitIcon : config . icon ) : config . icon } > </ span >
44
+ < Tooltip position = { [ 'top' , 'bottom' ] } hide-after = { 1000 } >
45
+ { {
46
+ default : ( ) => (
47
+ < span
48
+ class = "md-toolbar-item"
49
+ onClick = { onToolbarItemClick }
50
+ innerHTML = { config . id === 'fullscreen' ? ( showFullscreen . value ? config . exitIcon : config . icon ) : config . icon } >
51
+ </ span >
52
+ ) ,
53
+ content : ( ) => (
54
+ < span class = 'md-toolbar-tip-content' innerHTML = { getTooltipContent ( config . name , config . shortKey ) } >
55
+ </ span >
56
+ )
57
+ } }
49
58
</ Tooltip >
50
59
) }
51
60
{ config . type === 'dropDown' && (
@@ -54,7 +63,16 @@ export default defineComponent({
54
63
default : ( ) => (
55
64
< span >
56
65
< Tooltip position = { showFullscreen . value ? [ 'right' ] : [ 'top' ] } content = { getTooltipContent ( config . name ) } hide-after = { 1000 } >
57
- < span class = "md-toolbar-item" onClick = { ( ) => config . handler ?.( ) } innerHTML = { config . icon } > </ span >
66
+ { {
67
+ default : ( ) => (
68
+ < span class = "md-toolbar-item" onClick = { ( ) => config . handler ?.( ) } innerHTML = { config . icon } >
69
+ </ span >
70
+ ) ,
71
+ content : ( ) => (
72
+ < span class = 'md-toolbar-tip-content' innerHTML = { getTooltipContent ( config . name ) } >
73
+ </ span >
74
+ )
75
+ } }
58
76
</ Tooltip >
59
77
</ span >
60
78
) ,
Original file line number Diff line number Diff line change 40
40
}
41
41
}
42
42
43
+ .md-toolbar-tip-content {
44
+ display : inline-block ;
45
+ padding : 4px 16px ;
46
+ }
47
+
43
48
.dropdown-font-size {
44
49
padding : 0 ;
45
50
margin : 0 ;
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ export default defineComponent({
259
259
$\\sqrt{3x-1}+(1+x)^2$ // DEMO无法进行import,使用时请放开代码中注释
260
260
`);
261
261
262
- mdPlugins = [{
262
+ const mdPlugins = [{
263
263
// plugin: mk
264
264
}];
265
265
@@ -303,7 +303,7 @@ Alice -> "Bob()" : Hello
303
303
Long --> "Bob()" : ok
304
304
@enduml`);
305
305
306
- mdPlugins = [{
306
+ const mdPlugins = [{
307
307
// plugin: PlantUml,
308
308
// opts: {server: 'https://www/plantuml.com/plantuml'} // 自定义server可参考plantuml官方文档进行搭建
309
309
}];
You can’t perform that action at this time.
0 commit comments