Skip to content

Commit

Permalink
Merge pull request #1747 from DevCloudFE/dev
Browse files Browse the repository at this point in the history
update main from dev
  • Loading branch information
GreatZPP authored Sep 14, 2023
2 parents dbbd308 + 1052aac commit fcdb1fa
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
30 changes: 24 additions & 6 deletions packages/devui-vue/devui/editor-md/src/components/toolbar-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,20 @@ export default defineComponent({
return () => (
<>
{config.type === 'button' && (
<Tooltip position={['top', 'bottom']} content={getTooltipContent(config.name, config.shortKey)} hide-after={1000}>
<span
class="md-toolbar-item"
onClick={onToolbarItemClick}
innerHTML={config.id === 'fullscreen' ? (showFullscreen.value ? config.exitIcon : config.icon) : config.icon}></span>
<Tooltip position={['top', 'bottom']} hide-after={1000}>
{{
default: () => (
<span
class="md-toolbar-item"
onClick={onToolbarItemClick}
innerHTML={config.id === 'fullscreen' ? (showFullscreen.value ? config.exitIcon : config.icon) : config.icon}>
</span>
),
content: () => (
<span class='md-toolbar-tip-content' innerHTML={getTooltipContent(config.name, config.shortKey)}>
</span>
)
}}
</Tooltip>
)}
{config.type === 'dropDown' && (
Expand All @@ -54,7 +63,16 @@ export default defineComponent({
default: () => (
<span>
<Tooltip position={showFullscreen.value ? ['right'] : ['top']} content={getTooltipContent(config.name)} hide-after={1000}>
<span class="md-toolbar-item" onClick={() => config.handler?.()} innerHTML={config.icon}></span>
{{
default: () => (
<span class="md-toolbar-item" onClick={() => config.handler?.()} innerHTML={config.icon}>
</span>
),
content: () => (
<span class='md-toolbar-tip-content' innerHTML={getTooltipContent(config.name)}>
</span>
)
}}
</Tooltip>
</span>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
}
}

.md-toolbar-tip-content {
display: inline-block;
padding: 4px 16px;
}

.dropdown-font-size {
padding: 0;
margin: 0;
Expand Down
4 changes: 2 additions & 2 deletions packages/devui-vue/docs/components/editor-md/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export default defineComponent({
$\\sqrt{3x-1}+(1+x)^2$ // DEMO无法进行import,使用时请放开代码中注释
`);
mdPlugins = [{
const mdPlugins = [{
// plugin: mk
}];
Expand Down Expand Up @@ -303,7 +303,7 @@ Alice -> "Bob()" : Hello
Long --> "Bob()" : ok
@enduml`);
mdPlugins = [{
const mdPlugins = [{
// plugin: PlantUml,
// opts: {server: 'https://www/plantuml.com/plantuml'} // 自定义server可参考plantuml官方文档进行搭建
}];
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-devui",
"version": "1.5.15-hotfix.2",
"version": "1.5.15-hotfix.3",
"license": "MIT",
"description": "DevUI components based on Vite and Vue3",
"keywords": [
Expand Down

0 comments on commit fcdb1fa

Please sign in to comment.