From 8f5684c00d5235d4420a4d4d14d0a2bb3d608a68 Mon Sep 17 00:00:00 2001 From: GreatZP Date: Thu, 14 Sep 2023 19:08:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(editor-md):=20tooltip=E5=85=B3=E9=97=AD?= =?UTF-8?q?innerHTML=E6=B8=B2=E6=9F=93=E5=90=8E=E7=9B=B4=E6=8E=A5=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E9=97=AE=E9=A2=98=20(#1746)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor-md/src/components/toolbar-item.tsx | 30 +++++++++++++++---- .../editor-md/src/components/toolbar.scss | 5 ++++ .../docs/components/editor-md/index.md | 4 +-- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/packages/devui-vue/devui/editor-md/src/components/toolbar-item.tsx b/packages/devui-vue/devui/editor-md/src/components/toolbar-item.tsx index 442608aaa2..9608d22398 100644 --- a/packages/devui-vue/devui/editor-md/src/components/toolbar-item.tsx +++ b/packages/devui-vue/devui/editor-md/src/components/toolbar-item.tsx @@ -41,11 +41,20 @@ export default defineComponent({ return () => ( <> {config.type === 'button' && ( - - + + {{ + default: () => ( + + + ), + content: () => ( + + + ) + }} )} {config.type === 'dropDown' && ( @@ -54,7 +63,16 @@ export default defineComponent({ default: () => ( - config.handler?.()} innerHTML={config.icon}> + {{ + default: () => ( + config.handler?.()} innerHTML={config.icon}> + + ), + content: () => ( + + + ) + }} ), diff --git a/packages/devui-vue/devui/editor-md/src/components/toolbar.scss b/packages/devui-vue/devui/editor-md/src/components/toolbar.scss index 43a4785b82..99528ab85a 100644 --- a/packages/devui-vue/devui/editor-md/src/components/toolbar.scss +++ b/packages/devui-vue/devui/editor-md/src/components/toolbar.scss @@ -40,6 +40,11 @@ } } +.md-toolbar-tip-content { + display: inline-block; + padding: 4px 16px; +} + .dropdown-font-size { padding: 0; margin: 0; diff --git a/packages/devui-vue/docs/components/editor-md/index.md b/packages/devui-vue/docs/components/editor-md/index.md index 5ca74c3e46..cf66ef77fd 100644 --- a/packages/devui-vue/docs/components/editor-md/index.md +++ b/packages/devui-vue/docs/components/editor-md/index.md @@ -259,7 +259,7 @@ export default defineComponent({ $\\sqrt{3x-1}+(1+x)^2$ // DEMO无法进行import,使用时请放开代码中注释 `); - mdPlugins = [{ + const mdPlugins = [{ // plugin: mk }]; @@ -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官方文档进行搭建 }]; From 1052aacd5a9de1b88e52916ec2d718430ccbbd9e Mon Sep 17 00:00:00 2001 From: GreatZP Date: Thu, 14 Sep 2023 19:09:06 +0800 Subject: [PATCH 2/2] chore: Update package.json --- packages/devui-vue/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/devui-vue/package.json b/packages/devui-vue/package.json index 9e74b311a4..cddbbfccb4 100644 --- a/packages/devui-vue/package.json +++ b/packages/devui-vue/package.json @@ -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": [